Forum Discussion
Count price position in PowerBI
- 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.
Hidde you can create a measure and then place your fields on a matrix or table
Price Ranking = RANKX (all ('table',CALCULATE(sum('table'[price])),,ASC)
obviousy your price amount needs to be a decimal or whole number
- Hidde8 years ago
Helper I
Thanks! Needs a little modification though because this only works if you have one product (I have multiple);
Client 1 Product 1 2 Client 2 Product 1 8 Client 3 Product 1 4 Client 1 Product 2 1000 Client 2 Product 2 2 Client 3 Product 2 200 Tried this but I it does not have correct order:
Price position = RANKX(all(Table1),calculate(sum(Table1[Price]),values(Table1[Product])))
- vanessafvg8 years ago
Community Champion
Price Ranking = RANKX (all ('Price Position'[Client],'Price Position'[Amount]),CALCULATE(sum('Price Position'[Amount])))
- Hidde8 years ago
Helper I
Thanks, but with that the highest amount has the highest ranking (1). Highest amount (or price) should have lowest ranking (3).