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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AlexJ01
Helper I
Helper I

How to make line chart end?

Hi there,

 

I have created some running total measures (count vs date) for a cummulative line chart which looks like this:

AlexJ01_0-1686081873606.png

I've got a separte date table which has been used to create the measures:

AlexJ01_2-1686082284377.png

 

The issue I have is that the blue and purple lines have no data past about July, so I'd like those lines to end there, but I can't seem to do it without breaking them. Basically I want it to look like the below:

AlexJ01_1-1686082067964.png

Any help would be appreciated!

4 REPLIES 4
Greg_Deckler
Super User
Super User

@AlexJ01 So, going to be a bit dependent on exactly how things are configured in your model but perhaps something like this:

Blue Line RT =
  VAR __Measure = [Blue Line Running Total Measure]
  VAR __Count = COUNTROWS( 'Block 5 )
  VAR __Result = IF( __Count = BLANK(), BLANK(), __Measure )
RETURN
  __Result

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  I'm still learning all the language - could you help me out if I provide my report and data files? 

@AlexJ01 That's usually the fastest way to victory.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler  I've uploaded a simplified version of my report & data source file to this WeTransfer link: https://we.tl/t-DSWRWvEpLG 

Helpful resources

Announcements
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.