Forum Discussion

smjzahid's avatar
smjzahid
Icon for Helper V rankHelper V
5 years ago
Solved

How to customise Line Chart Visual to stop at certain date

I have a Line Chart which connects to excel and has a Running Total calculated as shown below

 

 

 

 

Value running total in Attribute = 
CALCULATE(
	SUM('BFO Summary (Weekly)'[Value]),
	FILTER(
		ALLSELECTED('BFO Summary (Weekly)'[Date]),
		ISONORAFTER('BFO Summary (Weekly)'[Date], MAX('BFO Summary (Weekly)'[Date]), DESC)
	)
)

 

This is how I have plotted the data on this Line Chart

 

 My data looks like this 

 

 

3 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, smjzahid ;

    You could create a measure  and apply it into chart filter, as follows:

    flag = IF(MAX([Date])>DATE(2021,7,11)&&MAX([ Baseline/Actual])="Actual",0,1)

    The final output is shown below:

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi smjzahid ,

     

    Not sure if you have everything in your query, but just based on the title of your query, I think you are looking for how to add START and END to your x-axis on the chart.

    If yes, then:

    • click on your visual
    • click on the format painter icon to go to formatting settings for this visual
    • Under x-axis, you will have an option to define START and END for your x-axis.

    Thanks,

    Pragati

    • smjzahid's avatar
      smjzahid
      Icon for Helper V rankHelper V

      Hi Pragati11 

       

      Thanks for the tip, No thats not achieving my purpose, as I mentioned I have created a measure which calculates Running Total, ( see measure DAX code in my previous post) and I want that measure to return ZERO 0 or null after 11/07/21 so the dotted line stops on 11/07/21 but I want the solid Line (Planned) to continue ahead, I know quite weird requirement, 

       

      What do you think?