cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smjzahid
Helper IV
Helper IV

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

 

image.png

 

 

 

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

 

image.png

 My data looks like this 

image.png

 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community 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)

vyalanwumsft_0-1627024330489.png

The final output is shown below:

vyalanwumsft_1-1627024397135.png

vyalanwumsft_2-1627024434077.png

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.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community 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)

vyalanwumsft_0-1627024330489.png

The final output is shown below:

vyalanwumsft_1-1627024397135.png

vyalanwumsft_2-1627024434077.png

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.

View solution in original post

Pragati11
Super User
Super User

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


My Blog: Data Vibe
Connect: LinkedIn
Connect: Twitter






If this helps, Appreciate a KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




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?

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors