<?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 dividing row total of a column by the subtotal of that column, period wise in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3522428#M135327</link>
    <description>&lt;P&gt;&lt;SPAN&gt;i want to divide each row of TY_Actual with its subtotal i.e 110679.54 to get the %. for example if i divide lunch row TY i.e 30001.88 by 110679.54 i will get 27%. now here is the catch, this TY_Actual column has data of 6 months, and the value 30001.88 is the sum of values of 6 months. now if i put a slicer on it for 5th month, my TY_Actual col will be updated with 5th month data and subtotal will change and thus the % calculated will change too.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i'm currently using this dax query ----&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TTP &lt;/SPAN&gt;&lt;SPAN&gt;by&lt;/SPAN&gt;&lt;SPAN&gt; Total % =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Daypart'&lt;/SPAN&gt;&lt;SPAN&gt;[TTP_TY_Actual]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Daypart'&lt;/SPAN&gt;&lt;SPAN&gt;[TTP_TY_Actual]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Daypart'&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;divide&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt;) * &lt;/SPAN&gt;&lt;SPAN&gt;100&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 08 Nov 2023 12:48:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-11-08T12:48:27Z</dc:date>
    <item>
      <title>dividing row total of a column by the subtotal of that column, period wise</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3522428#M135327</link>
      <description>&lt;P&gt;&lt;SPAN&gt;i want to divide each row of TY_Actual with its subtotal i.e 110679.54 to get the %. for example if i divide lunch row TY i.e 30001.88 by 110679.54 i will get 27%. now here is the catch, this TY_Actual column has data of 6 months, and the value 30001.88 is the sum of values of 6 months. now if i put a slicer on it for 5th month, my TY_Actual col will be updated with 5th month data and subtotal will change and thus the % calculated will change too.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i'm currently using this dax query ----&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TTP &lt;/SPAN&gt;&lt;SPAN&gt;by&lt;/SPAN&gt;&lt;SPAN&gt; Total % =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Daypart'&lt;/SPAN&gt;&lt;SPAN&gt;[TTP_TY_Actual]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Daypart'&lt;/SPAN&gt;&lt;SPAN&gt;[TTP_TY_Actual]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Daypart'&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;divide&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt;) * &lt;/SPAN&gt;&lt;SPAN&gt;100&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Nov 2023 12:48:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3522428#M135327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-08T12:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row total of a column by the subtotal of that column, period wise</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3522623#M135328</link>
      <description>&lt;P&gt;You can restore the months in the filter as shown below with VALUES().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TTP by Total % =
VAR a =
    SUM( 'Daypart'[TTP_TY_Actual] )
VAR b =
    CALCULATE(
        SUM( 'Daypart'[TTP_TY_Actual] ),
        REMOVEFILTERS( 'Daypart' ),
        VALUES( DayPart[YearMonth] )
    )
RETURN
    DIVIDE( a, b ) * 100
&lt;/LI-CODE&gt;
&lt;P&gt;However, your request isn't 100% clear, so please explain your exact goal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to get good help fast. Help us help you.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A href="https://www.sqlbi.com/blog/alberto/2021/01/22/on-how-to-ask-a-technical-question-if-you-really-want-an-answer/" rel="noopener" target="_blank"&gt;How To Ask A Technical Question If you Really Want An Answer&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" rel="noopener" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt; - Give us a good and concise explanation&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" rel="noopener" target="_blank"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt; - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 14:11:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3522623#M135328</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2023-11-08T14:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row total of a column by the subtotal of that column, period wise</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3524205#M135403</link>
      <description>&lt;P&gt;yes it is working. actually i want to make it more dynamic. i have other columns like TY_1, TY_2 and so on so how can i generalize your formula to make it more dynamic&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 06:20:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3524205#M135403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-09T06:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row total of a column by the subtotal of that column, period wise</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3525748#M135467</link>
      <description>&lt;P&gt;Replace REMOVEFILTERS() with ALLSELECTED().&lt;BR /&gt;&lt;BR /&gt;That might not do what you want though. You didn't explain what you mean by "Dynamic." Please read the below this time give us enough info to help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How to get good help fast. Help us help you.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A href="https://www.sqlbi.com/blog/alberto/2021/01/22/on-how-to-ask-a-technical-question-if-you-really-want-an-answer/" rel="noopener" target="_blank"&gt;How To Ask A Technical Question If you Really Want An Answer&lt;/A&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" rel="noopener" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt; - Give us a good and concise explanation&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" rel="noopener" target="_blank"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt; - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 16:09:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-total-of-a-column-by-the-subtotal-of-that-column/m-p/3525748#M135467</guid>
      <dc:creator>edhans</dc:creator>
      <dc:date>2023-11-09T16:09:00Z</dc:date>
    </item>
  </channel>
</rss>

