<?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: One semantic model for many clients: pivoting key-value data blows up my fact table in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5159817#M16044</link>
    <description>&lt;P&gt;Thanks for the detailed and insightful answer! I will look into it!&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2026 09:08:15 GMT</pubDate>
    <dc:creator>robertozsr</dc:creator>
    <dc:date>2026-04-28T09:08:15Z</dc:date>
    <item>
      <title>One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5156064#M15951</link>
      <description>&lt;P class=""&gt;Hey all, looking for some sanity-checking on my dimensional model.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt; We had separate Power BI Desktop files per client — each was a copy of the same model, tailored per tenant. We've now moved to Fabric and I want a single semantic model filtered by client_id, so every client only sees their own data. Tailored dashboards can still be built on top of the same model when a client asks for something custom.&lt;/P&gt;&lt;P class=""&gt;My v1 was splitting the model per client. With help from the community I realized this gets messy fast — we have a lot of clients using this dashboard.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;The problem:&lt;/STRONG&gt; When we onboard a client on our platform, we store their data as key-value pairs, and the key names vary per client. When I pivot the long format into wide, I end up with ~600 columns in fact_check. I know columnar storage handles sparsity fine in terms of memory/compute, but a 600-column fact table in Power BI still feels wrong — the Fields pane is unusable, and every report builder has to scroll through a sea of null columns.&lt;/P&gt;&lt;P class=""&gt;This is exactly why v1 had me filtering by tenant_id &lt;STRONG&gt;before&lt;/STRONG&gt; pivoting — at that point the irrelevant keys were rows, not columns, so I could drop them cheaply, and each tenant ended up with a dense table of just their own keys. Clean, but meant one table per tenant, which doesn't scale.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Where I'm stuck:&lt;/STRONG&gt; I'm a junior, started as a data consultant, and I don't want to over-engineer because I need to show something to stakeholders soon. This is v2 of my semantic model.&lt;/P&gt;&lt;P class=""&gt;Any tips or patterns for multi-tenant semantic models where each client has a different set of metric keys? How do you handle the wide-vs-long tradeoff in Fabric without either (a) ballooning your fact table to 600 columns or (b) splitting the model per tenant?&lt;/P&gt;&lt;P class=""&gt;Appreciate any pointers.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2026 16:25:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5156064#M15951</guid>
      <dc:creator>robertozsr</dc:creator>
      <dc:date>2026-04-22T16:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5156155#M15953</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1368772"&gt;@robertozsr&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Classic multi-tenant EAV challenge and the good news is: &lt;STRONG&gt;don't pivot at the Lakehouse level&lt;/STRONG&gt;. That's what's causing the blowup.&lt;/P&gt;&lt;P&gt;What's happening&lt;BR /&gt;When you pivot all key-value pairs across all tenants into columns, every client's unique keys become columns for everyone mostly NULL. That's the sparse wide table anti-pattern, and it gets worse as you add clients.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recommended pattern: keep EAV, enforce boundaries at the model layer&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Keep your data normalized in the Lakehouse :&lt;BR /&gt;FactMetrics (tenant_id, metric_key, metric_value, date)&lt;BR /&gt;DimMetricKeys (tenant_id, metric_key, display_label)&lt;BR /&gt;DimTenants (tenant_id, tenant_name)&lt;BR /&gt;Then in your semantic model :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Apply Row-Level Security (RLS) on tenant_id each client only sees their own rows, so they only see their own keys&lt;/LI&gt;&lt;LI&gt;Use DimMetricKeys as a slicer maps raw key names to human-readable labels per tenant&lt;/LI&gt;&lt;LI&gt;Write DAX measures using SELECTEDVALUE('DimMetricKeys'[metric_key]) to slice dynamically&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This way the "pivot" happens at the report layer, not in storage no blowup, no sparse columns.&lt;/P&gt;&lt;P&gt;If you need a physical wide table (performance reason only)&lt;BR /&gt;Create per-tenant SQL views in the Lakehouse SQL endpoint, pivoting only that tenant's keys. Use those views as DirectQuery sources in the semantic model.&lt;/P&gt;&lt;P&gt;As a junior consultant : start with the EAV + RLS approach. It's clean, scales well, and avoids maintaining per-client pivot logic. Only add complexity when you hit a real bottleneck.&lt;/P&gt;&lt;P&gt;More on RLS in Fabric:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2026 23:32:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5156155#M15953</guid>
      <dc:creator>Tamanchu</dc:creator>
      <dc:date>2026-04-22T23:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5158986#M16026</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1368772"&gt;@robertozsr&lt;/a&gt;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt;"&gt;&lt;SPAN&gt;I would also take a moment to thank&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1357760"&gt;@Tamanchu&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt; color: black;"&gt;&lt;SPAN&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Community Support Team.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2026 06:42:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5158986#M16026</guid>
      <dc:creator>v-hjannapu</dc:creator>
      <dc:date>2026-04-27T06:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5159817#M16044</link>
      <description>&lt;P&gt;Thanks for the detailed and insightful answer! I will look into it!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 09:08:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5159817#M16044</guid>
      <dc:creator>robertozsr</dc:creator>
      <dc:date>2026-04-28T09:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5159829#M16045</link>
      <description>&lt;P&gt;After a more careful reading: I think this is the correct solution. Thanks a lot. This really helps a lot! I will go on with trying implementing it!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 09:27:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5159829#M16045</guid>
      <dc:creator>robertozsr</dc:creator>
      <dc:date>2026-04-28T09:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5176566#M16090</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1357760"&gt;@Tamanchu&lt;/a&gt;&amp;nbsp;Hello! I am applying your suggestion. I have three facts (metrics, business rules, other_attributes) and created 3 different dimension that in the semantic model are related to those fact.&lt;BR /&gt;Now, because I am still in developing phase I am directly filtering on the page, for different tenants to test. And indeed base on the tenant I see different dim.keys in one slicer, and then when I select one of those key, another visual shows me the value from the fact! So thanks a lot!&lt;BR /&gt;&lt;BR /&gt;But I have two questions:&lt;BR /&gt;-&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Write DAX measures using SELECTEDVALUE('DimMetricKeys'[metric_key]) to slice dynamically -&amp;gt; I did not really understood why i need this and what it does where should I place it etc. To me when I select the key from the slicer dynamically already changes what i see in the visuals for the value. I created this measures you told me and applied to my visuals that should so the metric value, but nothing shows up. I am probably missing some understaing.&lt;/LI&gt;&lt;LI&gt;Reagarding the RLS, I will implement it later the concept is the same as filtering per tenant_id directly in the report? At the current state we create the dashboard in powerbi dekstop, in power query filtering at source level with tenant-id, then publish the dashboard to the client workspace, get the link and display for them. And then again creating another dashboard locally and redo the same process. Of course that is why we are migrating to Fabric to have something more dynamic and scalable. And in this actual situation I just create 1 report, and then implement this RLS, but not sure if I will still have to create more reports just copy past and change then rls, or because of this RLS&amp;nbsp; one report will be enogh... That is for later but if you have some pointers already would be nice. I have checked your link for RLS!&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 01 May 2026 08:44:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5176566#M16090</guid>
      <dc:creator>robertozsr</dc:creator>
      <dc:date>2026-05-01T08:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5176909#M16094</link>
      <description>&lt;P&gt;Hey!&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1368772"&gt;@robertozsr&lt;/a&gt;, glad it's starting to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;On SELECTEDVALUE vs. Simple Filtering&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You're right, the slicer already filters the rows. The real power of SELECTEDVALUE is turning a filter selection into a scalar value (a single piece of data) that you can reuse inside other logic.&lt;/P&gt;&lt;P&gt;While a simple&lt;BR /&gt;&lt;FONT color="#808000"&gt;&lt;EM&gt;SUM(FactMetrics[metric_value])&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;works when a relationship is in place, your explicit pattern is great for debugging.&lt;/P&gt;&lt;P&gt;If nothing shows up, the first thing to check is filter propagation in most cases, it's a relationship issue.&lt;/P&gt;&lt;P&gt;Keep in mind : SELECTEDVALUE returns BLANK() when multiple values are selected, so it's best used with single-select slicers or with a fallback value.&lt;/P&gt;&lt;P&gt;The Composite Key Challenge&lt;/P&gt;&lt;P&gt;Power BI doesn't support relationships based on multiple columns (e.g., tenant_id AND metric_key). If your data grain depends on both, you have two main paths:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Robust Way&lt;/STRONG&gt;&lt;BR /&gt;Create a composite key column (tenant_id &amp;amp; "-" &amp;amp; metric_key) in Power Query or your SQL upstream, then build the relationship on that column.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The DAX Way&lt;/STRONG&gt;&lt;BR /&gt;Use TREATAS to propagate filters virtually (especially useful when working with disconnected tables or when a physical relationship isn't possible).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;On RLS (Row-Level Security)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In real-world scenarios, it's better to use a security table instead of directly comparing tenant_id to USERPRINCIPALNAME().&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Security table : UserEmail | tenant_id&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;RLS rule :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Security[UserEmail] = USERPRINCIPALNAME()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Then relate :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Security → Tenant → Fact&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This approach is more scalable and allows one user to access multiple tenants if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Important&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;RLS is only enforced for users with &lt;STRONG&gt;Viewer&lt;/STRONG&gt; permissions.&lt;BR /&gt;Admins, Members, or Contributors can bypass it due to their elevated permissions (e.g., direct access to the semantic model).&lt;/P&gt;&lt;P&gt;So in multi-tenant scenarios, make sure end users are assigned as Viewers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the official documentation for deep diving into RLS :&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2026 22:41:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5176909#M16094</guid>
      <dc:creator>Tamanchu</dc:creator>
      <dc:date>2026-05-02T22:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: One semantic model for many clients: pivoting key-value data blows up my fact table</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5177283#M16108</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1357760"&gt;@Tamanchu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello! Thanks again for the clear explanation and detailed answer! I will look into it, and if I have question I will come back to you. Thanks a lot!!!&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 07:38:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/One-semantic-model-for-many-clients-pivoting-key-value-data/m-p/5177283#M16108</guid>
      <dc:creator>robertozsr</dc:creator>
      <dc:date>2026-05-04T07:38:27Z</dc:date>
    </item>
  </channel>
</rss>

