<?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 Multi-tenancy and the Hierarchy Control in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1847370#M29463</link>
    <description>&lt;P&gt;I have a multi-tenant application, and I want to use the Hierarchy control as a slicer for choosing various levels in an organization. I'm following the instructions for creating the hierarchy control (PATH, PATHLENGTH, Level1, Level2, ...), but the issue I'm having is that the number of levels is different from one tenant to another.&lt;BR /&gt;For example, if each tenant is a retail company, the first one may be a Mom &amp;amp; Pop store with 1 location (1 organization and 1 level), and the next company might be a national retailer with 100 locations (100 organizations stratified in 10 levels). Other than providing 20 levels (hoping this will cover the needs of all tenants), how do I accommodate different hierarchy depths?&lt;BR /&gt;Manually creating the levels is easy when you have 1 customer, but I need an automated way of creating the levels. I know the max tree depth for each tenant, but I don't know how to add calculated columns based on the tree depth so that each tenant has what it needs and no more.&lt;BR /&gt;Unfortunately, I'm a newb at DAX. I keep thinking there's a way to do it, but I cannot find anything anywhere about how to do it. I hope it's possible, but I'm starting to doubt myself! ha!&lt;BR /&gt;Any guidance is greatly appreciated!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 21:31:07 GMT</pubDate>
    <dc:creator>CVance</dc:creator>
    <dc:date>2021-05-17T21:31:07Z</dc:date>
    <item>
      <title>Multi-tenancy and the Hierarchy Control</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1847370#M29463</link>
      <description>&lt;P&gt;I have a multi-tenant application, and I want to use the Hierarchy control as a slicer for choosing various levels in an organization. I'm following the instructions for creating the hierarchy control (PATH, PATHLENGTH, Level1, Level2, ...), but the issue I'm having is that the number of levels is different from one tenant to another.&lt;BR /&gt;For example, if each tenant is a retail company, the first one may be a Mom &amp;amp; Pop store with 1 location (1 organization and 1 level), and the next company might be a national retailer with 100 locations (100 organizations stratified in 10 levels). Other than providing 20 levels (hoping this will cover the needs of all tenants), how do I accommodate different hierarchy depths?&lt;BR /&gt;Manually creating the levels is easy when you have 1 customer, but I need an automated way of creating the levels. I know the max tree depth for each tenant, but I don't know how to add calculated columns based on the tree depth so that each tenant has what it needs and no more.&lt;BR /&gt;Unfortunately, I'm a newb at DAX. I keep thinking there's a way to do it, but I cannot find anything anywhere about how to do it. I hope it's possible, but I'm starting to doubt myself! ha!&lt;BR /&gt;Any guidance is greatly appreciated!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 21:31:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1847370#M29463</guid>
      <dc:creator>CVance</dc:creator>
      <dc:date>2021-05-17T21:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-tenancy and the Hierarchy Control</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1852940#M29501</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/296516"&gt;@CVance&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Build a standard model of hierarchical structure in the data model. If a tenant has no value at a certain level, use a null value instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 05:28:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1852940#M29501</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2021-05-20T05:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-tenancy and the Hierarchy Control</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1855007#M29516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/184579"&gt;@v-lionel-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply, but how do I do that?&lt;/P&gt;&lt;P&gt;Here's the Dax for Level 3 of the hierarchy:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Level3 = 
VAR LevelNumber = 3
VAR LevelKey = PATHITEM ( MyHierarchy[EntityPath], LevelNumber, INTEGER )
VAR LevelName = LOOKUPVALUE ( MyHierarchy[Name], MyHierarchy[ID], LevelKey )
VAR Temp = IF(ISBLANK(LevelName), NULL, LevelName)
VAR Result = Temp
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This results in an error message: "Operator or expression 'NULL' is not supported in this context."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How else do I use NULL when there is no value in the row at the hierarchy level?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 19:18:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Multi-tenancy-and-the-Hierarchy-Control/m-p/1855007#M29516</guid>
      <dc:creator>cvance5</dc:creator>
      <dc:date>2021-05-20T19:18:09Z</dc:date>
    </item>
  </channel>
</rss>

