Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to group on the accountID and sort the products price and get out top three.
This is the table with example data:
AccountID Order OrderProducts Price
1234 XYZ Chair small 200
1234 XYZ Sofa 5000
1234 XYZ Bench 600
1234 XYZ Shelf 1200
1234 XYZ Table 2300
1234 XYZ Chair medium 300
2233 ABC Curtain 75
2233 ABC Pillow 80
2233 ABC Pillowcase 30
2233 ABC Tablecloth 40
2233 ABC Rug 150
When I choose accountID to add in my visual, I want to get the top three priced products for that account.
Example in matrix:
AccountID | Order |
| Price |
1234 | XYZ |
|
|
Sofa Table Shelf |
|
| 5000 2300 1200 |
2233 | ABC |
|
|
Rug Pillow Curtain |
|
| 150 80 75 |
How can I do this?
Solved! Go to Solution.
Hi,
You could try this:
Hi CarolineSH,
You could try below measure to see whether it work or not
Measure =
RANKX (
ALLEXCEPT ( 'Table (2)', 'Table (2)'[AccountID], 'Table (2)'[Order] ),
CALCULATE ( SUM ( 'Table (2)'[Price] ) ),
,
DESC,
DENSE
)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi CarolineSH,
You could try below measure to see whether it work or not
Measure =
RANKX (
ALLEXCEPT ( 'Table (2)', 'Table (2)'[AccountID], 'Table (2)'[Order] ),
CALCULATE ( SUM ( 'Table (2)'[Price] ) ),
,
DESC,
DENSE
)
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |