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
PowerBITestingG
Resolver I
Resolver I

Measure total wrong when going down hierarchy level

So I have a snapshot table and to get the latest total amount I am using the following:

 

 

 

Amount = sum(amount_raw)

Current Amount = 
var maxdate =MAX('report'[Snapshot date])
return
CALCULATE(
   [Amount],'report'[Snapshot date] >= maxdate )

 

 

 

My table is as follow:

snapshot dateAmountMaterialGroup
18/10/20202100101Plastics
18/10/20205200213Wood
20/10/2020350323Copper
20/10/20204353043Latex
20/10/20204123123Latex
20/10/202041232

Latex

 

So I create a matrix table that has 2 levels, group and Material. Group is fine but once I drilldown into material, I am getting the total for all dates

 

Any ideas on how to fix the issue? thank you!

1 ACCEPTED SOLUTION
PowerBITestingG
Resolver I
Resolver I

Solution was to get the max date of the entire table.

 Var maxdate =calculate(max(date),all(table))

 

 

 

 

View solution in original post

1 REPLY 1
PowerBITestingG
Resolver I
Resolver I

Solution was to get the max date of the entire table.

 Var maxdate =calculate(max(date),all(table))

 

 

 

 

Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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
Users online (3,096)