Forum Discussion

Petri's avatar
Petri
Frequent Visitor
3 years ago
Solved

Getting a unique value of the latest date

I would like power query to return just one row:  the latest date. I have always used a workaround (select the latest date, then group by date column) but I wonder if one could do this more effective...
  • v-jingzhang's avatar
    v-jingzhang
    3 years ago

    Hi Petri 

     

    Do you want to put custom1, custom2, etc. in different columns of a single row? Something like below?

    custom1 = #table({"Latest Date 1", "Latest Date 2"}, {{List.Max(ATable[Date]), List.Max(BTable[Date])}})
    in
    custom1

     

    If it's not what you want, can you provide the expected table you want to get with some sample data? 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.