The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi guys,
quick question:
I want to calculate a rank with RANKX but filter out zeros and blanks.
Any idea ? Filter does not work. 😞
Solved! Go to Solution.
Hi @Anonymous,
Please share a sample if the demo below doesn't help.
1. As a calculated column.
Ranks = IF ( ISBLANK ( [Value] ) || [Value] = 0, BLANK (), RANKX ( ALL ( 'Table1'[Name], Table1[Value] ), CALCULATE ( SUM ( Table1[Value] ) ) ) )
2. As a measure.
rankMeasure = VAR temp = SUM ( Table1[Value] ) RETURN IF ( temp = 0, BLANK (), RANKX ( ALL ( Table1[Name] ), CALCULATE ( SUM ( Table1[Value] ) ) ) )
Best Regards,
Dale
Hi @Anonymous,
Please share a sample if the demo below doesn't help.
1. As a calculated column.
Ranks = IF ( ISBLANK ( [Value] ) || [Value] = 0, BLANK (), RANKX ( ALL ( 'Table1'[Name], Table1[Value] ), CALCULATE ( SUM ( Table1[Value] ) ) ) )
2. As a measure.
rankMeasure = VAR temp = SUM ( Table1[Value] ) RETURN IF ( temp = 0, BLANK (), RANKX ( ALL ( Table1[Name] ), CALCULATE ( SUM ( Table1[Value] ) ) ) )
Best Regards,
Dale
Hi,
Share some data and show the expected result.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
141 | |
109 | |
108 | |
76 | |
63 |
User | Count |
---|---|
273 | |
129 | |
123 | |
101 | |
91 |