Forum Discussion

lilych's avatar
lilych
Helper II
5 years ago
Solved

Latest date based on multiple columns

Hello -   I have a table (see below) where updates are being entered. I only want to show the latest Created On Date based on the Department and Product columns. So for Marketing + Category A's upd...
  • v-henryk-mstf's avatar
    5 years ago

    Hi lilych ,

     

    I did a test, the reference is as follows:

    M_update =
    VAR _max =
        CALCULATE (
            MAX ( 'Table'[Created On] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Product Line] = MAX ( 'Table'[Product Line] )
                    && 'Table'[Department ] = MAX ( 'Table'[Department ] )
            )
        )
    RETURN
        CALCULATE ( MAX ( 'Table'[Update] ), 'Table'[Created On] = _max )

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

    Best Regards,
    Henry

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