Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
smjzahid
Helper V
Helper V

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.

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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.