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.
I have a data set that looks like the below:
CUSTOMER NAME | VOLUME |
CUSTOMER A | 250 |
CUSTOMER B | 450 |
CUSTOMER C | 100 |
CUSTOMER D | 340 |
(BLANK) | 750 |
I want to rank the customers where the customer name is not Blank.
I am currently using the below formula:
Solved! Go to Solution.
Please try below measures
total = sum(customer[VOLUME])
rank1 =
if(SELECTEDVALUE(customer[CUSTOMER NAME])=blank(),"",
RANKX(ALL('customer'),[total],,ASC))
Hope this is helpful.
Proud to be a Super User!
Hi @hstgeorge ,
Please try to update the formula of your measure as below:
rank toggle =
IF (
ISBLANK ( MAX ( 'SecVol_TD'[CHAIN NAME (groups)] ) )
|| MAX ( 'SecVol_TD'[CHAIN NAME (groups)] ) = "",
"",
RANKX (
FILTER (
ALLSELECTED( 'SecVol_TD'[CHAIN NAME (groups)] ),
NOT ( ISBLANK ( 'SecVol_TD'[CHAIN NAME (groups)] ) )
&& 'SecVol_TD'[CHAIN NAME (groups)] <> ""
),
CALCULATE ( [PY_UCS plus Volume] * 1 ),
,
DESC,
SKIP
)
)
Best Regards
Rena
Hi @hstgeorge ,
Please try to update the formula of your measure as below:
rank toggle =
IF (
ISBLANK ( MAX ( 'SecVol_TD'[CHAIN NAME (groups)] ) )
|| MAX ( 'SecVol_TD'[CHAIN NAME (groups)] ) = "",
"",
RANKX (
FILTER (
ALLSELECTED( 'SecVol_TD'[CHAIN NAME (groups)] ),
NOT ( ISBLANK ( 'SecVol_TD'[CHAIN NAME (groups)] ) )
&& 'SecVol_TD'[CHAIN NAME (groups)] <> ""
),
CALCULATE ( [PY_UCS plus Volume] * 1 ),
,
DESC,
SKIP
)
)
Best Regards
Rena
Hi @hstgeorge ,
Apart from the solution given below you can try this measure.
Ranking Vol =
IF (
MAX ( 'Table'[CUSTOMER NAME] )
<> BLANK (),
RANKX (
FILTER (
ALL ( 'Table'[CUSTOMER NAME] ),
'Table'[CUSTOMER NAME]
<> BLANK ()
),
CALCULATE (
SUM ( 'Table'[VOLUME] )
)
)
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Please try below measures
total = sum(customer[VOLUME])
rank1 =
if(SELECTEDVALUE(customer[CUSTOMER NAME])=blank(),"",
RANKX(ALL('customer'),[total],,ASC))
Hope this is helpful.
Proud to be a Super User!
Have you tried using ALLNOBLANKROW() instead of ALL() in your RANKX expression?
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |