<?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 model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780855#M62406</link>
    <description>&lt;P&gt;Thanks.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I do not know if Treatas is the best option here. Also chat gpt advised this to me.&amp;nbsp;&lt;BR /&gt;Let's wait for more optimized daxes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2025 07:07:21 GMT</pubDate>
    <dc:creator>jaryszek</dc:creator>
    <dc:date>2025-07-30T07:07:21Z</dc:date>
    <item>
      <title>How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4779612#M62390</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working on a Power BI model for cloud billing (Azure Cost Management) and trying to follow the guidance from Kimball Group’s “header/line item transaction” modeling patterns:&lt;BR /&gt;&lt;A href="https://www.kimballgroup.com/2007/10/design-tip-95-patterns-to-avoid-when-modeling-headerline-item-transactions/" target="_new" rel="noopener"&gt;https://www.kimballgroup.com/2007/10/design-tip-95-patterns-to-avoid-when-modeling-headerline-item-transactions/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My setup:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Fact table:&lt;/STRONG&gt; Fct_EA_AmortizedCosts&lt;BR /&gt;(Contains transaction/usage records, measures like TotalAmortizedCost)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Dimension table:&lt;/STRONG&gt; Dim_EA_AmortizedCosts_DiscountPlans --&amp;gt; &lt;STRONG&gt;will be converted to Fct_EA_AmortizedCosts_DiscountPlans&lt;/STRONG&gt;&lt;BR /&gt;(Contains rates/prices, like DiscountPlanEffectivePrice, and fields for topology: OfferId, ResourceLocationNormalized, PricingModel) -&amp;gt; it is aggregated table created on top of Fct_EA_AmortizedCosts&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Both tables are/will be connected to the same Date dimension for analysis.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Goal:&lt;/STRONG&gt;&lt;BR /&gt;- I want to build a matrix with:The three topology fields (OfferId, ResourceLocationNormalized, PricingModel)&lt;BR /&gt;-The “DiscountEffectivePrice” (from the newly created fact table)&lt;BR /&gt;- The “TotalAmortizedCost” (from the fact table)&lt;BR /&gt;&lt;BR /&gt;How to achive it?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any advice or best practice pointers are very welcome—especially for cloud billing and discount plan modeling!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 09:02:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4779612#M62390</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-07-29T09:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4779934#M62397</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;To model and aggregate both rates (like DiscountEffectivePrice) and amounts (like TotalAmortizedCost) following Kimball’s “header/line item” approach, especially in a Power BI context for cloud billing, consider the following structure and best practices:&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;1. Separate the Two Fact Tables by Grain&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Fct_EA_AmortizedCosts: Represents detailed line item-level transactions, such as usage and cost at the most granular level.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Fct_EA_AmortizedCosts_DiscountPlans: Represents rate-level data, such as DiscountEffectivePrice, typically aggregated by a pricing dimension grain (e.g., OfferId, PricingModel, ResourceLocationNormalized).&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Do not treat DiscountEffectivePrice as a dimension attribute if it varies by usage context—model it as a separate fact.&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;2. Create a Common Dimensional Topology&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Define a conformed dimension table (e.g., Dim_DiscountPlanTopology) with:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;OfferId&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;ResourceLocationNormalized&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;PricingModel&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Both fact tables should join to this dimension. This enables slicing across both facts using a consistent dimensional structure.&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;3. Use Role-Playing or Shared Date Dimension&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Ensure both fact tables use the same Dim_Date dimension so time-based aggregation aligns correctly in the model.&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;FONT color="#000000"&gt;4. Build the Matrix in Power BI&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;In Power BI:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Use a matrix visual with rows from the shared dimension (OfferId, ResourceLocationNormalized, PricingModel).&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Add TotalAmortizedCost from Fct_EA_AmortizedCosts as one measure.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Add DiscountEffectivePrice from Fct_EA_AmortizedCosts_DiscountPlans as another measure.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Ensure appropriate relationships exist between:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Fact tables and Dim_DiscountPlanTopology&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Fact tables and Dim_Date&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;5. Handling Aggregation Logic&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;TotalAmortizedCost: Use SUM as it’s additive.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;DiscountEffectivePrice: Use MIN, MAX, or AVG depending on the business requirement. If there’s one effective price per combination, use MAX or FIRSTNONBLANK.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;6. Avoid Pitfalls&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Do not try to model rates in the same table as amounts if their grains differ.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Do not use direct relationships between the two fact tables. Let dimensions serve as the bridge.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 29 Jul 2025 12:24:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4779934#M62397</guid>
      <dc:creator>jaineshp</dc:creator>
      <dc:date>2025-07-29T12:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780025#M62401</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1284569"&gt;@jaineshp&lt;/a&gt;&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;It could be nice but I afraid about having too many shared dim tables in a model. It will be difficult to handle.&amp;nbsp;&lt;BR /&gt;What about DAX statement?&amp;nbsp;&lt;BR /&gt;Could i handle it as measure?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;p.s. I know yur answer from chat gpt. But really is the solution from real life example?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 13:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780025#M62401</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-07-29T13:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780625#M62404</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;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Totally understand your concern, having too many shared dimensions in a model &lt;EM&gt;can&lt;/EM&gt; make it feel heavy and harder to manage, especially if the fact tables keep growing.&lt;BR /&gt;&lt;BR /&gt;DiscountEffectivePrice (Avg) :=&lt;BR /&gt;CALCULATE(&lt;BR /&gt;AVERAGE('Fct_EA_AmortizedCosts_DiscountPlans'[DiscountEffectivePrice]),&lt;BR /&gt;TREATAS(&lt;BR /&gt;VALUES('Fct_EA_AmortizedCosts'[OfferId]),&lt;BR /&gt;'Fct_EA_AmortizedCosts_DiscountPlans'[OfferId]&lt;BR /&gt;),&lt;BR /&gt;TREATAS(&lt;BR /&gt;VALUES('Fct_EA_AmortizedCosts'[ResourceLocationNormalized]),&lt;BR /&gt;'Fct_EA_AmortizedCosts_DiscountPlans'[ResourceLocationNormalized]&lt;BR /&gt;),&lt;BR /&gt;TREATAS(&lt;BR /&gt;VALUES('Fct_EA_AmortizedCosts'[PricingModel]),&lt;BR /&gt;'Fct_EA_AmortizedCosts_DiscountPlans'[PricingModel]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;&lt;EM&gt;Jainesh Poojara | Power BI Developer&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 04:14:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780625#M62404</guid>
      <dc:creator>jaineshp</dc:creator>
      <dc:date>2025-07-30T04:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780855#M62406</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I do not know if Treatas is the best option here. Also chat gpt advised this to me.&amp;nbsp;&lt;BR /&gt;Let's wait for more optimized daxes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 07:07:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4780855#M62406</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-07-30T07:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4788565#M62536</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;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for the follow up. Understood that you're exploring whether TREATAS is the best fit here and waiting for more optimized DAX inputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to add some context &lt;STRONG&gt;-&lt;/STRONG&gt; TREATAS is commonly used in scenarios involving multiple fact tables at different grains. It helps propagate filters between them without needing physical relationships, which can be beneficial for both performance and flexibility in complex models. This is particularly relevant when dealing with rate-based vs transactional fact tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might find these references useful:&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Best-practice-for-structuring-data-with-Header-and-Lines-tables/td-p/2199193" target="_blank"&gt;Solved: Best practice for structuring data with Header and... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-create-measures-across-multiple-fact-tables-with-multiple/td-p/3048935" target="_blank"&gt;Solved: How to create measures across multiple fact tables... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TREATAS-to-filter-multiple-columns-in-combination/m-p/2441505/highlight/true#M65384" target="_blank"&gt;Solved: Re: TREATAS to filter multiple columns in combinat... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1284569"&gt;@jaineshp&lt;/a&gt;&amp;nbsp;for valuable suggestions.&lt;/P&gt;
&lt;P&gt;Hope this helps. Please reach out for further assistance.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 07:39:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4788565#M62536</guid>
      <dc:creator>v-veshwara-msft</dc:creator>
      <dc:date>2025-08-06T07:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to model and aggregate rate (dimension) and amount (fact) per Kimball “header/line item” ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4789525#M62560</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;Hey&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/882993"&gt;@v-veshwara-msft&lt;/a&gt;,&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;Thank you for the kind recognition - always happy to contribute to our community's success!&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;Best Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;&lt;EM&gt;Jainesh Poojara | Power BI Developer&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 04:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-model-and-aggregate-rate-dimension-and-amount-fact-per/m-p/4789525#M62560</guid>
      <dc:creator>jaineshp</dc:creator>
      <dc:date>2025-08-07T04:29:55Z</dc:date>
    </item>
  </channel>
</rss>

