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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Analitika
Post Prodigy
Post Prodigy

Wrong Total on max

Measure1 = 

MAXX(DISTINCT('T1'[sas_kod]),CALCULATE(max('T1'[TurnCredNC])-max('T1'[TurnDebNC])))
 
Measure2 = 
SUMX(VALUES('T1'[sas_kod]),[Measure1 ])
 
So Measure2 give wrong Columns total also like Measure1, but should just Sum all results from Measure2
 
Analitika_0-1625226455051.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Analitika ,

Please change the formula of your measures [Measure1] and [Measure2] as below, you can find the details in the attachment.

Measure1 = CALCULATE ( SUM ( 'T1'[TurnCredNC] ) ) - CALCULATE ( SUM ( 'T1'[TurnDebNC] ) )
Measure2 = SUMX ( VALUES ( 'T1'[sas_kod] ), MAXX ( VALUES ( 'T1'[Date] ), [Measure1] ) )

yingyinr_2-1625452442650.png

If the above one is not what you want, please provide more details on your requirement. Thank you.

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Analitika ,

Please change the formula of your measures [Measure1] and [Measure2] as below, you can find the details in the attachment.

Measure1 = CALCULATE ( SUM ( 'T1'[TurnCredNC] ) ) - CALCULATE ( SUM ( 'T1'[TurnDebNC] ) )
Measure2 = SUMX ( VALUES ( 'T1'[sas_kod] ), MAXX ( VALUES ( 'T1'[Date] ), [Measure1] ) )

yingyinr_2-1625452442650.png

If the above one is not what you want, please provide more details on your requirement. Thank you.

Best Regards

but it wrong too lookk 12407  4+9=13 but your total is 9 this is wrong

Anonymous
Not applicable

Hi @Analitika ,

Please update the formula of Measure2 as below:

Measure2 = SUMX(GROUPBY('T1','T1'[sas_kod],'T1'[Date]),[Measure1])

yingyinr_0-1625472917555.png

If the above one still not correct, please provide your expected result base on my sample data. Thank you.

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.