Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I’m trying to configure a pie chart so that a specific value appears first. After searching online, it seems the usual approach is to use a custom table or add a column for sorting.
Here’s the challenge: my data comes from an SSAS model, and I don’t have permission to modify it. The values are measures that together add up to 100%, which is why they work well in a pie chart. However, since they are three separate measures, I can’t sort them directly.
Has anyone dealt with this before? Any ideas on how to proceed without changing the SSAS model?
Solved! Go to Solution.
@Iaine What does "first" mean in a pie chart? Like first on the Legend? That is simply a matter of your order of your measures in the Values field of the pie chart.
Hi @Iaine,
SortTable =
DATATABLE(
"Label", STRING,
"SortOrder", INTEGER,
{
{"Measure A", 1},
{"Measure B", 2},
{"Measure C", 3}
}
)MeasureValue =
SWITCH(
SELECTEDVALUE(SortTable[Label]),
"Measure A", [MeasureA],
"Measure B", [MeasureB],
"Measure C", [MeasureC]
)If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn
Hello,
Without access to the SSAS model, it's difficult to do anything properly.
Can you create a local table in your Power BI ? If Yes, try this :
MeasuresPie =
DATATABLE(
"Label", STRING,
"Order", INTEGER,
{
{"My Measure A", 1},
{"My Measure B", 2},
{"My Measure C", 3}
}
)
Pie Value :=
VAR lbl = SELECTEDVALUE(MeasuresPie[Label])
RETURN
SWITCH(
TRUE(),
lbl = "My Measure A", [MeasureA_SSAS],
lbl = "My Measure B", [MeasureB_SSAS],
lbl = "My Measure C", [MeasureC_SSAS],
BLANK()
)
Have a nice day,
Vivien
@Iaine What does "first" mean in a pie chart? Like first on the Legend? That is simply a matter of your order of your measures in the Values field of the pie chart.
Oh my god i was looking for some wierd over complicated solution. It was that simple awesome thanks loads
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.