Forum Discussion
kristir2010
3 years agoRegular Visitor
Using MAXX and filter with dates from date slicer
I want the max value of a category. Which I have done successfully by using this Max = var fid = Table[category] return CALCULATE( MAXX( FILTER(Table, Table[category] = ...
- Anonymous3 years ago
Hi kristir2010 ,
You can try this code to create a calculated column.
Value in Max Date each Category = VAR _MAXDATE = CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Category] ) ) RETURN CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Date] = _MAXDATE ) )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi kristir2010 ,
You can try this code to create a calculated column.
Value in Max Date each Category =
VAR _MAXDATE =
CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Category] ) )
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', 'Table'[Date] = _MAXDATE )
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.