Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
User | Count |
---|---|
96 | |
85 | |
77 | |
66 | |
63 |
User | Count |
---|---|
110 | |
96 | |
96 | |
67 | |
59 |