The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
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 |
---|---|
110 | |
102 | |
83 | |
63 | |
57 |
User | Count |
---|---|
254 | |
119 | |
115 | |
100 | |
76 |