Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello Everyone, I am fairly new to PBI and I am having trouble with the rank x function.
I have four columns: SKU, Vendor, Total Instock, Total Count (See below for table).
SKU |
| Vendor | Total Instock | Total Count |
123456 |
| 10 | 100 | 125 |
456789 |
| 10 | 155 | 1478 |
147852 |
| 10 | 418 | 1025 |
258963 |
| 5 | 748 | 2588 |
369852 |
| 25 | 369 | 1478 |
123789 |
| 25 | 348 | 500 |
456357 |
| 31 | 256 | 900 |
159753 |
| 31 | 248 | 300 |
So far, I created the measure:
Solved! Go to Solution.
Hi @Anonymous ,
Try ALLEXCEPT() function.
rank sku = RANKX(ALLEXCEPT('In Stock','In Stock'[Vendor]),'In Stock'[Instock %],,DESC)
Best Regards,
Jay
Hi @Anonymous ,
Try ALLEXCEPT() function.
rank sku = RANKX(ALLEXCEPT('In Stock','In Stock'[Vendor]),'In Stock'[Instock %],,DESC)
Best Regards,
Jay
Hi @Anonymous ,
Try
Measure rank vendor = RANKX(ALL('Table'[Vendor],'Table'[SKU]),[Measure Instock %],,DESC)
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Harsh,
I tried this, but it returned random numbers that did not rank the vendors.
-gps0014
Hi @Anonymous ,
Returning correct for me based on the data you shared.
Hi @Anonymous ,
Can you share the screenshot of your visualization ?
Regards,
HN
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 46 | |
| 34 | |
| 27 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 59 | |
| 58 | |
| 39 | |
| 22 | |
| 20 |