Forum Discussion

StuartSmith's avatar
StuartSmith
Power Participant
1 year ago
Solved

Display Most Recent Date for each Device ID (Ranked)

How can I get it so the table visual only shows 1 one per "Device ID" where the row is the most recent date.  I have manged to rank each row for each Device ID, but now stuggling to just get a single...
  • amitchandak's avatar
    1 year ago

    StuartSmith , Use the Rank function as measure and filter on Index Function

    Index Function
    calculate([Meausre], index(1, allselected(Table[Device], Table[Last Update Date]), orderby(Table[Last Update Date],desc),,partitionBy(Table[Device]) ) )

     

    Example of rank

    New Rank Desne = rank(DENSE,allselected(Table[Device], Table[Last Update Date]),orderby(Table[Last Update Date],desc),partitionBy(Table[Device]))