Forum Discussion

klajmexka's avatar
klajmexka
New Member
5 years ago
Solved

Filtering highest ID based on one unique number in direct query mode

Hello,   I'm stuggling with a solution how to filter only highest ID for each number in table. I managed to do it in offline DB however not able to make it work in direct query mode.   Let's say ...
  • V-lianl-msft's avatar
    5 years ago

    Hi klajmexka ,

     

    Please try to create a measure like this and apply it to visual level filter.

    Measure 2 = 
    var max_id = CALCULATE(MAX('Table'[ID]),ALLEXCEPT('Table','Table'[NMB]))
    return IF(MAX('Table'[ID])=max_id,1,0)

     

     

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