Forum Discussion
Hidde
Helper I
8 years agoCount price position in PowerBI
Hi, I am struggling with finding a solution for this: I have a lot of prices per product, so the data looks like this: Product - client - price - Price Position Product 1 - Client 1 - €2 - 1...
- 8 years ago
Hi Hidde,
To achieve your requirement, you can try this calculated column:
Price Ranking = RANKX ( FILTER ( 'Rank', 'Rank'[Product] = EARLIER ( 'Rank'[Product] ) ), 'Rank'[Price], , ASC )Thanks,
Xi Jin.
vanessafvg
Community Champion
8 years agoHidde then all you need to do is change it to ASC instead of DESC
Hidde
Helper I
8 years agoTried that ofcourse, but doesnt work. It inverts something as now the ranking 4 is the lowest, but that should be 1:
- vanessafvg8 years ago
Community Champion
Hidde does this work?
Price Ranking = RANKX (all ('Price Position'[Client]),CALCULATE(sum('Price Position'[Amount])),,ASC,Dense)