<?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: Other options for calculating margin categories by product and Year-Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4671306#M178930</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="895941" data-lia-user-login="fo6168" class="lia-mention lia-mention-user"&gt;fo6168&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have gotten this issue resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is solved, &lt;STRONG&gt;&lt;I&gt;please mark the helpful reply or share your solution and accept&lt;/I&gt;&lt;/STRONG&gt; &lt;EM&gt;&lt;STRONG&gt;it as solution&lt;/STRONG&gt;&lt;/EM&gt;, it will be helpful for other members of the community who have similar problems as yours to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;B Manikanteswara Reddy&lt;/P&gt;</description>
    <pubDate>Mon, 28 Apr 2025 14:50:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-04-28T14:50:26Z</dc:date>
    <item>
      <title>Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4647687#M177894</link>
      <description>&lt;P&gt;I have a business case to calculate revenue and margin for products within a certain margin range by year and month. For example,&amp;nbsp; &amp;nbsp;product category "A" has $10,000 sales in January 2025. In category A, $4,000 worth of products were under 10% margin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started by creating a calculated table so I can calculate margin % by product and year month, then assigning a category. I think this will work for my use case, but I am afraid that the calculated table will reduce performance and if the semantic model is moved to Fabric, we won't be able to use DirectLake mode if a calculated table exists. Is there a way to achieve a similar result using measures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the expression I used to create the calculated table. I also included a screenshot of the end result I am trying to achieve for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below the table shows the % of revenue for products below 10% margin :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The below DAX expression is what I am using to create a calculated table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR ProductsByYearMonth =&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'Global Sales Invoicing',&lt;BR /&gt;ProductDimExtended[Product_Dim_dKey],&lt;BR /&gt;LegalCustomerDim[Customer_Dim_dKey],&lt;BR /&gt;Time[YearMonth]&lt;BR /&gt;&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VAR MarginByYearMonthProduct =&lt;BR /&gt;ADDCOLUMNS(&lt;BR /&gt;ProductsByYearMonth,&lt;BR /&gt;"@ProdSales",[TotalInvoicedLineValue_USD],&lt;BR /&gt;"@ProdCost",[TotalAdjustedCost_USD],&lt;BR /&gt;"@ProdMargin",[MarginAdjusted_USD],&lt;BR /&gt;"@ProdMargin%",[MArgin%Adjusted_USD],&lt;BR /&gt;"@MarginCategory", SWITCH(&lt;BR /&gt;TRUE,&lt;BR /&gt;[TEST_Margin] &amp;lt;= 0.1, "Low",&lt;BR /&gt;[TEST_Margin] &amp;lt;= 0.2, "Medium",&lt;BR /&gt;"High"&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VAR Result =&lt;BR /&gt;SELECTCOLUMNS (&lt;BR /&gt;MarginByYearMonthProduct,&lt;BR /&gt;"ProductKey", ProductDimExtended[Product_Dim_dKey],&lt;BR /&gt;"CustomerKey", LegalCustomerDim[Customer_Dim_dKey],&lt;BR /&gt;"YearMonth", Time[YearMonth],&lt;BR /&gt;"ProductSales", [@ProdSales],&lt;BR /&gt;"ProdMargin",[@ProdMargin],&lt;BR /&gt;"ProdMargin%", [@ProdMargin%],&lt;BR /&gt;"MarginCategory", [@MarginCategory]&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;Result&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 22:05:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4647687#M177894</guid>
      <dc:creator>fo6168</dc:creator>
      <dc:date>2025-04-10T22:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4647749#M177897</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 23:38:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4647749#M177897</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-10T23:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4648987#M177970</link>
      <description>&lt;P&gt;Hi, what type of data would be helpful to share? The transactional data that I am rolling up into the calculated table or the data that I have in the calculated table already?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 15:32:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4648987#M177970</guid>
      <dc:creator>fo6168</dc:creator>
      <dc:date>2025-04-11T15:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4649267#M177978</link>
      <description>&lt;P&gt;You seem to want to avoid the calculated table - so I guess the underlying data.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 19:50:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4649267#M177978</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-11T19:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4666778#M178751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="895941" data-lia-user-login="fo6168" class="lia-mention lia-mention-user"&gt;fo6168&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have gotten this issue resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is solved, &lt;STRONG&gt;&lt;I&gt;please mark the helpful reply or share your solution and accept&lt;/I&gt;&lt;/STRONG&gt; it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;B Manikanteswara Reddy&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 12:47:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4666778#M178751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-04-24T12:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4671306#M178930</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="895941" data-lia-user-login="fo6168" class="lia-mention lia-mention-user"&gt;fo6168&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have gotten this issue resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is solved, &lt;STRONG&gt;&lt;I&gt;please mark the helpful reply or share your solution and accept&lt;/I&gt;&lt;/STRONG&gt; &lt;EM&gt;&lt;STRONG&gt;it as solution&lt;/STRONG&gt;&lt;/EM&gt;, it will be helpful for other members of the community who have similar problems as yours to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;B Manikanteswara Reddy&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 14:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4671306#M178930</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-04-28T14:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4676059#M179078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="895941" data-lia-user-login="fo6168" class="lia-mention lia-mention-user"&gt;fo6168&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have gotten this issue resolved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is solved, please mark the helpful reply or share your solution and &lt;FONT color="#008000"&gt;&lt;STRONG&gt;&lt;I&gt;accept it as solution&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, it will be helpful for other members of the community who have similar problems as yours to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;B Manikanteswara Reddy&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2025 15:22:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4676059#M179078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-01T15:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Other options for calculating margin categories by product and Year-Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4718764#M180721</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="895941" data-lia-user-login="fo6168" class="lia-mention lia-mention-user"&gt;fo6168&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;As we haven’t heard back from you, we will go ahead and close this ticket for now.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;If you need any further assistance, please don’t hesitate to raise a new ticket, we’re always happy to help.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;Our sincere apologies if there was any inconvenience caused.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 11.0pt;"&gt;B Manikanteswara Reddy&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jun 2025 19:09:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Other-options-for-calculating-margin-categories-by-product-and/m-p/4718764#M180721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-06-03T19:09:06Z</dc:date>
    </item>
  </channel>
</rss>

