Forum Discussion

kristir2010's avatar
kristir2010
Regular Visitor
3 years ago
Solved

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] = ...
  • Anonymous's avatar
    Anonymous
    3 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 Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.