Forum Discussion
Calculate difference DISTINCT COUNT between rows
- 6 years ago
Anonymous the way I see it something like this, add following measure
Measure = VAR __currentIndex = MAX ( Table[Index] ) VAR __prevIndex = __currentIndex - 1 RETURN CALCULATE ( <<Your Measure>>, Table[Index] = __prevIndex )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
Hi parry2k ,
I tried to use index, but honesly I don't know whyt it's not working. When I'll start writing EARLIER function, it says parameter is not correct type.
I'm using dimension tables in Matrix, so maybe that's the problem.
Anonymous the way I see it something like this, add following measure
Measure =
VAR __currentIndex = MAX ( Table[Index] )
VAR __prevIndex = __currentIndex - 1
RETURN
CALCULATE ( <<Your Measure>>, Table[Index] = __prevIndex )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡