Forum Discussion
NewbieJono
1 year agoPost Partisan
Calculating based on Max Date
Hello, i am looking to calculate the total volume by each date for the Max date of receipt only: example below.
- 1 year ago
Hi NewbieJono
Please try this:
Measure1 = VAR MaxDate = CALCULATE ( MAX ( 'Table'[Receipt date] ), ALL ( 'Table'[Receipt date] ) ) RETURN SUMX ( VALUES ( 'Table'[Date] ), CALCULATE ( SUM ( 'Table'[Randvalues] ), FILTER ( 'Table', 'Table'[Receipt date] = MaxDate ) ) )
123abc
1 year agoCommunity Champion
First you Identify the Max DateOfReceipt with below Dax:
MaxDateOfReceipt = MAX('Table'[DateOfReceipt])
Then to Calculate Total Volume for Each Date (filtered by Max DateOfReceipt):
TotalVolumeForMaxDateOfReceipt =
CALCULATE(
SUM('Table'[Volume]),
'Table'[DateOfReceipt] = [MaxDateOfReceipt]
)
his will give you the result similar to the example in your screenshot, where it shows total volumes only for the entries with the maximum DateOfReceipt. Let me know if you need further customization!