<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Sort Pie Chart Values When Using SSAS Measures? in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4900463#M12997</link>
    <description>&lt;P&gt;Oh my god i was looking for some wierd over complicated solution. It was that simple awesome thanks loads&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Dec 2025 08:49:12 GMT</pubDate>
    <dc:creator>Iaine</dc:creator>
    <dc:date>2025-12-12T08:49:12Z</dc:date>
    <item>
      <title>How to Sort Pie Chart Values When Using SSAS Measures?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899869#M12989</link>
      <description>&lt;DIV&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Has anyone dealt with this before? Any ideas on how to proceed without changing the SSAS model?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Dec 2025 15:02:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899869#M12989</guid>
      <dc:creator>Iaine</dc:creator>
      <dc:date>2025-12-11T15:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sort Pie Chart Values When Using SSAS Measures?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899928#M12991</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/437328"&gt;@Iaine&lt;/a&gt;&amp;nbsp;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.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 15:36:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899928#M12991</guid>
      <dc:creator>GeraldGEmerick</dc:creator>
      <dc:date>2025-12-11T15:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sort Pie Chart Values When Using SSAS Measures?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899929#M12992</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Without access to the SSAS model, it's difficult to do anything properly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you create a local table in your Power BI ? If Yes, try this :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Enable (if possible) the DirectQuery for Power BI datasets and AS feature and switch your report to a composite model (in Desktop: File → Options → Preview features if needed, then connect in DirectQuery to the compatible dataset/AS).&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Create a disconnected table (in Power BI Desktop):&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;MeasuresPie =
DATATABLE(
    "Label", STRING,
    "Order", INTEGER,
    {
        {"My Measure A", 1},
        {"My Measure B", 2},
        {"My Measure C", 3}
    }
)
​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a SWITCH measure that returns the SSAS measure based on the selected label:&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;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()
    )
​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;BR /&gt;&lt;BR /&gt;Vivien&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 15:36:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899929#M12992</guid>
      <dc:creator>vivien57</dc:creator>
      <dc:date>2025-12-11T15:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sort Pie Chart Values When Using SSAS Measures?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899945#M12993</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/437328"&gt;@Iaine&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;This is a common limitation when working with SSAS models because you cannot add custom columns or tables for sorting. However, there are a couple of approaches you can use directly in Power BI without modifying the SSAS model:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;H3&gt;&lt;STRONG&gt;1. Create a Composite Table in Power BI Using DAX&lt;/STRONG&gt;&lt;/H3&gt;&lt;DIV class=""&gt;Since your measures are separate and you want them sorted, you can create a small calculated table in Power BI that references these measures and includes a sort order.&lt;/DIV&gt;&lt;DIV class=""&gt;Example:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;SortTable =
DATATABLE(
    "Label", STRING,
    "SortOrder", INTEGER,
    {
        {"Measure A", 1},
        {"Measure B", 2},
        {"Measure C", 3}
    }
)&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV class=""&gt;Then create a measure for each value:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;MeasureValue =
SWITCH(
    SELECTEDVALUE(SortTable[Label]),
    "Measure A", [MeasureA],
    "Measure B", [MeasureB],
    "Measure C", [MeasureC]
)&lt;/LI-CODE&gt;&lt;DIV&gt;Use &lt;STRONG&gt;SortTable[SortOrder]&lt;/STRONG&gt; to sort the pie chart. This way, you control the order without touching the SSAS model.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;If this response was helpful in any way, I’d gladly accept a &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;much like the joy of seeing a DAX measure work first time without needing another FILTER.&lt;/P&gt;&lt;P&gt;Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop &lt;span class="lia-unicode-emoji" title=":cyclone:"&gt;🌀&lt;/span&gt;.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 15:49:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4899945#M12993</guid>
      <dc:creator>Zanqueta</dc:creator>
      <dc:date>2025-12-11T15:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sort Pie Chart Values When Using SSAS Measures?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4900463#M12997</link>
      <description>&lt;P&gt;Oh my god i was looking for some wierd over complicated solution. It was that simple awesome thanks loads&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 08:49:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4900463#M12997</guid>
      <dc:creator>Iaine</dc:creator>
      <dc:date>2025-12-12T08:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sort Pie Chart Values When Using SSAS Measures?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4900674#M13000</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/437328"&gt;@Iaine&lt;/a&gt;&amp;nbsp;No problem! Happy to assist!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 14:04:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/How-to-Sort-Pie-Chart-Values-When-Using-SSAS-Measures/m-p/4900674#M13000</guid>
      <dc:creator>GeraldGEmerick</dc:creator>
      <dc:date>2025-12-12T14:04:37Z</dc:date>
    </item>
  </channel>
</rss>

