Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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?
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |