<?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 dax for dynamic hierarchies? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727434#M61729</link>
    <description>&lt;P&gt;Thanks for answers.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is a result which i am getting from my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1749565899670.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275304iC418F3AC13B9B9FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1749565899670.png" alt="jaryszek_0-1749565899670.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_1-1749565907614.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275305i53A110502032C79D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_1-1749565907614.png" alt="jaryszek_1-1749565907614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and your dax it is not working:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_2-1749565997979.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275306iB333BB48FF87AD82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_2-1749565997979.png" alt="jaryszek_2-1749565997979.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is not groupimng hierarchies in slicer.&lt;BR /&gt;&lt;BR /&gt;did you check the youtube attached?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jun 2025 14:34:06 GMT</pubDate>
    <dc:creator>jaryszek</dc:creator>
    <dc:date>2025-06-10T14:34:06Z</dc:date>
    <item>
      <title>How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4726778#M61719</link>
      <description>&lt;P&gt;Hi Guys,&lt;BR /&gt;&lt;BR /&gt;i am using this tutorial:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=5G_xSJy5muo" target="_self"&gt;https://www.youtube.com/watch?v=5G_xSJy5muo&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;in order to create dynamic hierarhies:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dynamic Hierarchy = {
    ("BillingAccountId", NAMEOF('Fct_EA_AmortizedCosts'[BillingAccountId]), 0, "Billing Hierarchy"),
    ("BillingAccountName", NAMEOF('Fct_EA_AmortizedCosts'[BillingAccountName]), 1, "Billing Hierarchy"),
    ("BillingProfileId", NAMEOF('Fct_EA_AmortizedCosts'[BillingProfileId]), 2, "Billing Hierarchy"),
    ("BillingProfileName", NAMEOF('Fct_EA_AmortizedCosts'[BillingProfileName]), 3, "Billing Hierarchy"),
    ("InvoiceSectionId", NAMEOF('Fct_EA_AmortizedCosts'[InvoiceSectionId]), 4, "Billing Hierarchy"),
    ("InvoiceSectionName", NAMEOF('Fct_EA_AmortizedCosts'[InvoiceSectionName]), 5, "Billing Hierarchy"),
    ("SubscriptionId", NAMEOF('Fct_EA_AmortizedCosts'[SubscriptionId]), 6, "Subscription Hierarchy"),
    ("SubscriptionName", NAMEOF('Fct_EA_AmortizedCosts'[SubscriptionName]), 7, "Subscription Hierarchy"),
    ("ResourceGroup", NAMEOF('Fct_EA_AmortizedCosts'[ResourceGroup]), 8, "Subscription Hierarchy"),
    ("ResourceName", NAMEOF('Fct_EA_AmortizedCosts'[ResourceName]), 9, "Subscription Hierarchy"),
    ("ResourceType", NAMEOF('Fct_EA_AmortizedCosts'[ResourceType]), 10, "ResourceType Hierarchy"),
    ("ResourceType", NAMEOF('Fct_EA_AmortizedCosts'[MeterId]), 11, "ResourceType Hierarchy"),
    ("ResourceType", NAMEOF('Fct_EA_AmortizedCosts'[MeterCategory]), 12, "ResourceType Hierarchy"),
    ("ResourceType", NAMEOF('Fct_EA_AmortizedCosts'[MeterSubCategory]), 13, "ResourceType Hierarchy")
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;but the issue is that ResoureType is shown before Subcription because of alphabetical order. How to sort this table by my own terms (order should be like in dax above).&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 09:01:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4726778#M61719</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-06-10T09:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727111#M61726</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, by default power bi visuals sort the dynamic hierarchy alphabetically by the label. So we need to extract the tuple elements and explicitly sort them by the custom sort order field. Please try this below measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DynamicHierarchy =&lt;/P&gt;
&lt;P&gt;SELECTCOLUMNS(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("BillingAccountId", NAMEOF('Fct_EA_AmortizedCosts'[BillingAccountId]), 0, "Billing Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("BillingAccountName", NAMEOF('Fct_EA_AmortizedCosts'[BillingAccountName]), 1, "Billing Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("BillingProfileId", NAMEOF('Fct_EA_AmortizedCosts'[BillingProfileId]), 2, "Billing Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("BillingProfileName", NAMEOF('Fct_EA_AmortizedCosts'[BillingProfileName]), 3, "Billing Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("InvoiceSectionId", NAMEOF('Fct_EA_AmortizedCosts'[InvoiceSectionId]), 4, "Billing Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("InvoiceSectionName", NAMEOF('Fct_EA_AmortizedCosts'[InvoiceSectionName]), 5, "Billing Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("SubscriptionId", NAMEOF('Fct_EA_AmortizedCosts'[SubscriptionId]), 6, "Subscription Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("SubscriptionName", NAMEOF('Fct_EA_AmortizedCosts'[SubscriptionName]), 7, "Subscription Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("ResourceGroup", NAMEOF('Fct_EA_AmortizedCosts'[ResourceGroup]), 8, "Subscription Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("ResourceName", NAMEOF('Fct_EA_AmortizedCosts'[ResourceName]), 9, "Subscription Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("ResourceType", NAMEOF('Fct_EA_AmortizedCosts'[ResourceType]), 10, "ResourceType Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("MeterId", NAMEOF('Fct_EA_AmortizedCosts'[MeterId]), 11, "ResourceType Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("MeterCategory", NAMEOF('Fct_EA_AmortizedCosts'[MeterCategory]), 12, "ResourceType Hierarchy"),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("MeterSubCategory", NAMEOF('Fct_EA_AmortizedCosts'[MeterSubCategory]), 13, "ResourceType Hierarchy")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Label", [Value1],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ColumnName", [Value2],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SortOrder", [Value3],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "HierarchyGroup", [Value4]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now in the table visual sort by the SortOrder column not Label. This make sure the hierarchy displays exactly in the custom order specified in the DAX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;helps, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Accepting as solution&amp;nbsp;&lt;/STRONG&gt;to help the other members find it more quickly,&amp;nbsp;don't forget to give a&amp;nbsp;&lt;STRONG&gt;"Kudos"&lt;/STRONG&gt;&amp;nbsp;– I’d truly appreciate it!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 11:46:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727111#M61726</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-06-10T11:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727112#M61727</link>
      <description>&lt;P&gt;You're defining a dynamic hierarchy in DAX as a calculated table, but you're seeing it sorted alphabetically because Power BI automatically sorts by the first column unless explicitly overridden.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;DynamicHierarchyTable =
DATATABLE(
    "Label", STRING,
    "ColumnName", STRING,
    "Index", INTEGER,
    "HierarchyGroup", STRING,
    {
        {"BillingAccountId", "Fct_EA_AmortizedCosts[BillingAccountId]", 0, "Billing Hierarchy"},
        {"BillingAccountName", "Fct_EA_AmortizedCosts[BillingAccountName]", 1, "Billing Hierarchy"},
        {"BillingProfileId", "Fct_EA_AmortizedCosts[BillingProfileId]", 2, "Billing Hierarchy"},
        {"BillingProfileName", "Fct_EA_AmortizedCosts[BillingProfileName]", 3, "Billing Hierarchy"},
        {"InvoiceSectionId", "Fct_EA_AmortizedCosts[InvoiceSectionId]", 4, "Billing Hierarchy"},
        {"InvoiceSectionName", "Fct_EA_AmortizedCosts[InvoiceSectionName]", 5, "Billing Hierarchy"},
        {"SubscriptionId", "Fct_EA_AmortizedCosts[SubscriptionId]", 6, "Subscription Hierarchy"},
        {"SubscriptionName", "Fct_EA_AmortizedCosts[SubscriptionName]", 7, "Subscription Hierarchy"},
        {"ResourceGroup", "Fct_EA_AmortizedCosts[ResourceGroup]", 8, "Subscription Hierarchy"},
        {"ResourceName", "Fct_EA_AmortizedCosts[ResourceName]", 9, "Subscription Hierarchy"},
        {"ResourceType", "Fct_EA_AmortizedCosts[ResourceType]", 10, "ResourceType Hierarchy"},
        {"MeterId", "Fct_EA_AmortizedCosts[MeterId]", 11, "ResourceType Hierarchy"},
        {"MeterCategory", "Fct_EA_AmortizedCosts[MeterCategory]", 12, "ResourceType Hierarchy"},
        {"MeterSubCategory", "Fct_EA_AmortizedCosts[MeterSubCategory]", 13, "ResourceType Hierarchy"}
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Power BI Desktop:&lt;/P&gt;&lt;P&gt;Go to the Data view.&lt;/P&gt;&lt;P&gt;Select the DynamicHierarchyTable.&lt;/P&gt;&lt;P&gt;Click on the Label column.&lt;/P&gt;&lt;P&gt;On the Modeling tab → click Sort by Column → select Index.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 11:46:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727112#M61727</guid>
      <dc:creator>Nithinr</dc:creator>
      <dc:date>2025-06-10T11:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727434#M61729</link>
      <description>&lt;P&gt;Thanks for answers.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is a result which i am getting from my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1749565899670.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275304iC418F3AC13B9B9FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1749565899670.png" alt="jaryszek_0-1749565899670.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_1-1749565907614.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275305i53A110502032C79D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_1-1749565907614.png" alt="jaryszek_1-1749565907614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and your dax it is not working:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_2-1749565997979.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275306iB333BB48FF87AD82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_2-1749565997979.png" alt="jaryszek_2-1749565997979.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is not groupimng hierarchies in slicer.&lt;BR /&gt;&lt;BR /&gt;did you check the youtube attached?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 14:34:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4727434#M61729</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-06-10T14:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4731592#M61799</link>
      <description>&lt;P&gt;Anyone?&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 13:08:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4731592#M61799</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-06-13T13:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4732873#M61815</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please follow below steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a calculated table like below:&lt;/P&gt;
&lt;P&gt;DynamicHierarchyTable =&lt;/P&gt;
&lt;P&gt;DATATABLE(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "HierarchyGroup", STRING,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Label", STRING,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ColumnName", STRING,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SortOrder", INTEGER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Billing Hierarchy", "BillingAccountId", "Fct_EA_AmortizedCosts[BillingAccountId]", 0},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Billing Hierarchy", "BillingAccountName", "Fct_EA_AmortizedCosts[BillingAccountName]", 1},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Billing Hierarchy", "BillingProfileId", "Fct_EA_AmortizedCosts[BillingProfileId]", 2},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Billing Hierarchy", "BillingProfileName", "Fct_EA_AmortizedCosts[BillingProfileName]", 3},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Billing Hierarchy", "InvoiceSectionId", "Fct_EA_AmortizedCosts[InvoiceSectionId]", 4},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Billing Hierarchy", "InvoiceSectionName", "Fct_EA_AmortizedCosts[InvoiceSectionName]", 5},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Subscription Hierarchy", "SubscriptionId", "Fct_EA_AmortizedCosts[SubscriptionId]", 6},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Subscription Hierarchy", "SubscriptionName", "Fct_EA_AmortizedCosts[SubscriptionName]", 7},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Subscription Hierarchy", "ResourceGroup", "Fct_EA_AmortizedCosts[ResourceGroup]", 8},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"Subscription Hierarchy", "ResourceName", "Fct_EA_AmortizedCosts[ResourceName]", 9},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"ResourceType Hierarchy", "ResourceType", "Fct_EA_AmortizedCosts[ResourceType]", 10},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"ResourceType Hierarchy", "MeterId", "Fct_EA_AmortizedCosts[MeterId]", 11},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"ResourceType Hierarchy", "MeterCategory", "Fct_EA_AmortizedCosts[MeterCategory]", 12},&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"ResourceType Hierarchy", "MeterSubCategory", "Fct_EA_AmortizedCosts[MeterSubCategory]", 13}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Go to Data view select the Label column, go to Column tools tab --&amp;gt; Sort by Column, select the required column.&lt;/P&gt;
&lt;P&gt;In the slicer, use a hierarchical slicer with HierarchyGroup and then Label below.&lt;/P&gt;
&lt;P&gt;This will group the hierarchies in the slicer and able to dynamically select any hierarchy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;helps, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Accepting as solution&amp;nbsp;&lt;/STRONG&gt;to help the other members find it more quickly,&amp;nbsp;don't forget to give a&amp;nbsp;&lt;STRONG&gt;"Kudos"&lt;/STRONG&gt;&amp;nbsp;– I’d truly appreciate it!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 06:06:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4732873#M61815</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-06-16T06:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4733736#M61831</link>
      <description>&lt;P&gt;Ok,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;so I did :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1750085411632.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1276762i0B800FBC3D8522EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1750085411632.png" alt="jaryszek_0-1750085411632.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;and now make the slicer and still ResourceType is before Subscription.&amp;nbsp;&lt;BR /&gt;It is not working:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_1-1750085524426.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1276763i10B5BA7A2009CEA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_1-1750085524426.png" alt="jaryszek_1-1750085524426.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 14:52:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4733736#M61831</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-06-16T14:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dax for dynamic hierarchies?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4735871#M61867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both columns HierarchyGroup and Label must be sorted correctly for the hierarchical slicer to work. Please follow both steps below carefully:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Sort Label by SortOrder&lt;/LI&gt;
&lt;LI&gt;Sort HierarchyGroup by a new column, go to Modeling --&amp;gt; New column and create this column:&lt;BR /&gt;
&lt;P&gt;GroupSortOrder =&lt;/P&gt;
&lt;P&gt;SWITCH(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRUE(),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'DynamicHierarchyTable'[HierarchyGroup] = "Billing Hierarchy", 1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'DynamicHierarchyTable'[HierarchyGroup] = "Subscription Hierarchy", 2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'DynamicHierarchyTable'[HierarchyGroup] = "ResourceType Hierarchy", 3,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 99&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;Now select the HierarchyGroup column --&amp;gt; go to Column tools --&amp;gt; click Sort by Column and select GroupSortOrder.&lt;/LI&gt;
&lt;LI&gt;Use a hierarchical slicer with HierarchyGroup at the top and Label below.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Please make sure to sort both HierarchyGroup by the new GroupSortOrder column, and Label by SortOrder. This will ensure that the slicer displays the hierarchy groups and their fields in the correct order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;helps, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Accepting as solution&amp;nbsp;&lt;/STRONG&gt;to help the other members find it more quickly,&amp;nbsp;don't forget to give a&amp;nbsp;&lt;STRONG&gt;"Kudos"&lt;/STRONG&gt;&amp;nbsp;– I’d truly appreciate it!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 11:21:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-sort-dax-for-dynamic-hierarchies/m-p/4735871#M61867</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2025-06-18T11:21:36Z</dc:date>
    </item>
  </channel>
</rss>

