Forum Discussion

4-3-3's avatar
4-3-3
Icon for Helper I rankHelper I
6 years ago
Solved

How do you GROUPBY two collumns with DAX?

I have a table that has multiple records for each day of the year for multiple entities. I need to create a column that will flag the newest record for each day as per the below example. Can someone ...
  • v-xuding-msft's avatar
    v-xuding-msft
    6 years ago

    Hi 4-3-3 ,

    I modified my formula that you can have a try.

    Flag = 
    var max_recorded = CALCULATE(MAX('Table'[recorded]),ALLEXCEPT('Table','Table'[date]))
    return
    IF('Table'[recorded] = max_recorded,"Yes",BLANK())

     

    Best Regards,

    Xue Ding

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