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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Cumulative Measure in Line and clustered column chart

Dear Community, 

I am trying to do multiple cumulative curves together with bars in a Line and clustered column chart. 

The bars are working fine but cant get the cumulative measures to work. 

Problem is that it dosent seems to be able to show the data on the same time. 

What i would think would happen is the following on top of the bars:

Table1.png

 But what happens is the following:

 

Graph1.PNGAs you can see the lines are on top of each other. Next to the graph the data for the 4 diffrent lines is precented , even thoe it shows them in the ledged the the data is empty. If the filter is changed to only show one type of data it works. 

The following measure is used for the 4 lines, the only thing that changes is the "DataType":

Measure:

 

 

Curve Hours Gate Baseline = 
IF (FIRSTNONBLANK('Table Name'[DataType], 1)="Gate Baseline",
CALCULATE(CALCULATE(
	SUM('Table Name'[Hours]),
	FILTER ('Table Name', 'Table Name'[DataType]="Gate Baseline")),
	FILTER(
		ALLSELECTED('Table Name'[Month-Year]),
		ISONORAFTER('Table Name'[Month-Year], MAX('Table Name'[Month-Year]), DESC)
	)
)
,BLANK())

 

 

Table Data:

Table2.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

The solution was as followed:

 

Dax Code:

Curve Hours Gate Baseline = 
CALCULATE(
SUM('Table Name'[Hours]),
FILTER (ALLSELECTED('WPPMDBext1P_Q'), 
'Table Name'[DataType]="Gate Baseline"),

FILTER(
		ALLSELECTED('Table Name'[Month-Year]),
		ISONORAFTER('Table Name'[Month-Year], MAX('Table Name'[Month-Year]), DESC)
))

Result:

Capture99.PNG

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

The solution was as followed:

 

Dax Code:

Curve Hours Gate Baseline = 
CALCULATE(
SUM('Table Name'[Hours]),
FILTER (ALLSELECTED('WPPMDBext1P_Q'), 
'Table Name'[DataType]="Gate Baseline"),

FILTER(
		ALLSELECTED('Table Name'[Month-Year]),
		ISONORAFTER('Table Name'[Month-Year], MAX('Table Name'[Month-Year]), DESC)
))

Result:

Capture99.PNG

 

v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

It may be caused by the slicer, or it may be caused by other measures in the visual.

Will the lines in the visual be displayed correctly if you remove the slicer?

Please provide a sample .pbix file.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

amitchandak
Super User
Super User

@Anonymous , Not very clear.

Try like

CALCULATE(
SUM('Table Name'[Hours]),
FILTER (ALLSELECTED('Table Name'), 'Table Name'[DataType]="Gate Baseline" && 'Table Name'[Month-Year] = MAX('Table Name'[Month-Year]))
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

The code:

Curve Hours Gate Baseline = CALCULATE( SUM('Table Name'[Hours]), FILTER (ALLSELECTED('Table Name'), 'Table Name'[DataType]="Gate Baseline" && 'Table Name'[Month-Year] = MAX('Table Name'[Month-Year])) )

Works now the data is precented on top of the other data but not working as a cumulative line.

Current:

Capture2.PNG

Expected:

Capture.PNG

Any ides? I have tryed to use ISONORAFTER and EARLIER but that what gave me the problems to start with.

Thanks for the help so fare

Anonymous
Not applicable

Hi Amiitchandak, 

Thanks for the fast response, im getting the following belowm is this due to the &&?

Some one wrote you could just bracket the holee thing but would this be correct?

Octon_0-1609774827396.png

Error:

To use special characters in a column name, enclose the entire name in brackets ( [] ) and add a ] to any closing brackets in the name.

 

(Edited a simple mistake from my side forgot // Name = \\ in the top (Beginner mistake)) 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors