Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Wouter_MK
Frequent Visitor

Discerning between "Top 5" and "Other" in circle diagram.

I have two tables,  one dimension table with supplier names (dim_supplier) and one fact table with information about product sales (fact_sales).

 

I want to have a circle diagram visual, where as legend I can input the supplier names, and as values I can input some measure (e.g. I have a measure ["Total sales per supplier"]). However the issue is that I would like to only show the Top 5 suppliers based on the measure, and aggregate all other suppliers under some "Other" category, making for 6 total legend values.

 

So far, I was able to create the following DAXX:

 

Measure = 

var rank = RANKX(ALL(dim_supplier[Name]),["Total sales per supplier])

var name = IF(rank > 5, "Other", fact_sales["supplier key]) //note if used in dim_supplier use dim_supplier[Name]

 

My idea was to include this in a calculated column in either dim_supplier or fact_sales (I wasn't sure which one), but currently PowerBI is still stuck on calculating all of this after 15 minutes.

 

Does anyone have a more efficient way of achieving my goal?

 

 

0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.