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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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