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 ago
Price Ranking = RANKX (all ('Price Position'[Client],'Price Position'[Amount]),CALCULATE(sum('Price Position'[Amount])),,DESC)
Hidde
Helper I
8 years agoThanks, but still the first row has Ranking = 3, while it should have ranking =1
- vanessafvg8 years ago
Community Champion
Hidde then all you need to do is change it to ASC instead of DESC
- Hidde8 years ago
Helper I
Tried 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)