The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
My table visual has Year, Month, Customer, Country, and Total qty, and I want it to display top 10 customers order by their total qty in each month. I have created the total qty measure, Customer rank measure, and top 10 customer measure as following.
Hi @MeiYing - Modify your customer ranking measure as below ensuring ranking takes into account the alphabetical order
Customer Rank =
RANKX(
ALL('Top Cust'[CUSTOMER]),
[total qty],
[total qty] + 1/(1 + RANKX(ALL('Top Cust'[CUSTOMER]), [CUSTOMER], , ASC)),
DESC,
DENSE
)
Update your Top 10 Customer Qty Measure as below by calling Customer Rank
Top10 Customers Qty =
IF(
[Customer Rank] <= 10,
[total qty],
BLANK()
)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
81 | |
57 | |
48 | |
48 |