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 ) ) )
shafiz_p
1 year agoSuper User
Hi NewbieJono Try this:
TotalVolume=
VAR MaxDateOfReceipt =
CALCULATE(
MAX('Table'[DateOfReceipt]),
ALLEXCEPT('Table', 'Table'[Date])
)
RETURN
CALCULATE(
SUM('Table'[Volume]),
'Table'[DateOfReceipt] = MaxDateOfReceipt
)
Output:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz