Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have a problem when I tried to filter top 20 customers in a filtered table.
The table looks like as follow:
and it has filters as follow:
Measures are:
rank_var = RANKX(ALLSELECTED(Cust_Barrie[CUST_NM]),[corr_var],,DESC)
top 20 corr_var = IF([rank_var] <= 20, [Difference],BLANK())
I want a table with only top 20 customers, but I can't filter out blank values in column "top 20 corr_var". It will return only the top 1 customer.
I think the reason is I am using "ALLSELECTED" instead of "ALL" in "rank_var". But if I use "ALL", it will rank for all customers in the dataset instead of filtered customers in the table.
Is there a way to solve this problem?
Thanks,
Sherry
Solved! Go to Solution.
Hi @SC0614
Use this measure for rank
Measure = RANKX(ALLSELECTED(Sheet12),[Measure 2],,DESC,Dense)
Best Regards
Maggie
Hi @SC0614
Use this measure for rank
Measure = RANKX(ALLSELECTED(Sheet12),[Measure 2],,DESC,Dense)
Best Regards
Maggie
Hi Maggie,
Thanks for your response. It gives me every customer's list but I still can't filter out the top 20 customers. If I filter by "Measure less than or equal to 20", it would return only the first rank.
Hi @SC0614
I can do it on my site, could you show me some screenshots for better troubleshooting?
Best Regards
Maggie
Thanks, Maggie. Please find my screenshot below.
Here are my measures:
Regards,
Sherry
Hi @SC0614
Sorry, i don't find any error from your screenshot, the meaure which calculate teh rank show the correct rank from 1 to 26, not 1 for all rows.
The difference between your meaure and mine is
Best Regards
Maggie
Finally worked!!! Thanks a lot!!!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
77 | |
63 | |
51 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
60 | |
57 |