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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
pmhoang94
Helper I
Helper I

Calculation Measure

I have a table with measure:

 

TodayValSI = CALCULATE(SUM(SalesInOut[Amount])/1000000,FILTER(  
	ALL( SalesInOut[DateID]),   
      [DateID] = [MaxDate]
),SalesInOut[SalesType] = "I", SalesInOut[FreeItem] = FALSE())

Measure MaxDate:

 

 

MaxDate = CALCULATE(MAX(SalesInOut[DateID]), ALL(SalesInOut[DateID]))

I create a table with2 columns: ProductLine and TodayValSI.

I create a sclicer DateID to filter my table.

If I not filter, data in my table display not correct.

But if I filter MaxDate (2017/05/31), data in my table display correct.

Why?

Am I missing something?

This is link my report: https://drive.google.com/file/d/0B1L_chy-uFDKMTJGZHJYc3hiM1E/view?usp=sharing

 

 

1 ACCEPTED SOLUTION

@pmhoang94

 

Your issue is on your dummy measure [MaxDate].

 

Capture.PNG

 

You limit the context into entire Table so that on grand total level, it will always take the max date in the table which is "2017/5/31"

 

Just remove the ALL() part, it will return correct result.

 

22.PNG

 

Regards,

 

 

View solution in original post

2 REPLIES 2
pmhoang94
Helper I
Helper I

Capture11.PNG

Capture12.PNG

@pmhoang94

 

Your issue is on your dummy measure [MaxDate].

 

Capture.PNG

 

You limit the context into entire Table so that on grand total level, it will always take the max date in the table which is "2017/5/31"

 

Just remove the ALL() part, it will return correct result.

 

22.PNG

 

Regards,

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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