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.
Hi All,
So I have this problem using rankx. I am using Excel, btw.
I have to rank my sales ignoring filter atrributes (Segment, Country, Product, Discount Band).
This was my measure expression:
After ranking my sales, I wanted to show the top 10 sales for the whole table using the following expressions:
So basically, the outcome was what I wanted (see figure A). However, some weird entries appeared when I enabled the grand totals for column (see figure B).
Figure A.
Figure B.
How do i fix this?
Here's the file should you need to look at it. It's just a financial sample data from microsoft.
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous
I download your excel and update your measure in Power BI Desktop.
Financial Sales =
SUMX (
FILTER (
ALL ( financials ),
financials[Segment] = MAX ( financials[Segment] )
&& financials[Country] = MAX ( financials[Country] )
&& financials[Product] = MAX ( financials[Product] )
&& financials[Discount Band] = MAX ( financials[Discount Band] )
),
financials[ Sales]
)
Rank =
IF(ISINSCOPE(financials[Discount Band]),RANKX(ALL(financials),[Financial Sales],,DESC,Dense),BLANK())
Build a Matrix visual to show the result.
You can download the pbix file from this link: Rankx based on multiple columns
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.
Best Regards,
Rico Zhou
Hi @Anonymous
I download your excel and update your measure in Power BI Desktop.
Financial Sales =
SUMX (
FILTER (
ALL ( financials ),
financials[Segment] = MAX ( financials[Segment] )
&& financials[Country] = MAX ( financials[Country] )
&& financials[Product] = MAX ( financials[Product] )
&& financials[Discount Band] = MAX ( financials[Discount Band] )
),
financials[ Sales]
)
Rank =
IF(ISINSCOPE(financials[Discount Band]),RANKX(ALL(financials),[Financial Sales],,DESC,Dense),BLANK())
Build a Matrix visual to show the result.
You can download the pbix file from this link: Rankx based on multiple columns
Best Regards,
Rico Zhou
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 |
---|---|
114 | |
100 | |
78 | |
75 | |
50 |
User | Count |
---|---|
144 | |
109 | |
108 | |
87 | |
61 |