<?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: dividing row values with subtotal in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517608#M135082</link>
    <description>&lt;P&gt;Hello Anonymous&lt;/LI-USER&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you give more info on the measure you tried ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a first look, I could suggest in your measure to calculate the SUM of TY_Actual filtering by DayPart, and to calculate the same SUM but selecting all your table with ALL or ALLSELECTED depending on your need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can divide the filtered sum by the second and format your measure as %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It could look like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MyPercentage = 

VAR FilteredSum = CALCULATE (
SUM('YourTable'[TY_Actual], 
FILTER('YourTable', 'YourTable'[Daypart] = SELECTEDVALUE('YourTable'[Daypart])
)

VAR GlobalSum = SUM('YourTable'[TY_Actual])

RETURN DIVIDE(FilteredSum, GlobalSum)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Vincent BLOT&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2023 11:40:54 GMT</pubDate>
    <dc:creator>VBLOT</dc:creator>
    <dc:date>2023-11-06T11:40:54Z</dc:date>
    <item>
      <title>dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517577#M135078</link>
      <description>&lt;P&gt;i want to divide each row of TY_Actual with its subtotal i.e 110679.54 to get the %. i created 1 measure and it was showing correct value but the catch was the value was getting displayed in total row rest rows were empty&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:28:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517577#M135078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-06T11:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517608#M135082</link>
      <description>&lt;P&gt;Hello Anonymous&lt;/LI-USER&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you give more info on the measure you tried ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a first look, I could suggest in your measure to calculate the SUM of TY_Actual filtering by DayPart, and to calculate the same SUM but selecting all your table with ALL or ALLSELECTED depending on your need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can divide the filtered sum by the second and format your measure as %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It could look like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MyPercentage = 

VAR FilteredSum = CALCULATE (
SUM('YourTable'[TY_Actual], 
FILTER('YourTable', 'YourTable'[Daypart] = SELECTEDVALUE('YourTable'[Daypart])
)

VAR GlobalSum = SUM('YourTable'[TY_Actual])

RETURN DIVIDE(FilteredSum, GlobalSum)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Vincent BLOT&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 11:40:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517608#M135082</guid>
      <dc:creator>VBLOT</dc:creator>
      <dc:date>2023-11-06T11:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517730#M135089</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try below code&amp;nbsp;&lt;BR /&gt;just adjust your table and column name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;result = 

var a = sum('yourtablename'[TY_Actual])
var b = calculate ( sum('yourtablename'[TY_Actual],
                  removefilters('yourtablename')
                   )
return
divide (a,b)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 13:11:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517730#M135089</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-06T13:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517753#M135093</link>
      <description>&lt;P&gt;not working sir&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 12:59:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517753#M135093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-06T12:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517755#M135094</link>
      <description>&lt;P&gt;not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 12:59:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517755#M135094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-06T12:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517776#M135097</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;sorry, in above code there are some changes needed and i forgot to write it&amp;nbsp;&lt;BR /&gt;try below code&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;result = 

var a = sum('yourtablename'[TY_Actual])
var b = calculate ( sum('yourtablename'[TY_Actual],
                  removefilters('yourtablename')
                   )

return
divide(a,b)




&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if it not work then provide some sample data&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 13:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3517776#M135097</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-06T13:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: dividing row values with subtotal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3519439#M135178</link>
      <description>&lt;P&gt;Thank You so much....&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 09:14:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dividing-row-values-with-subtotal/m-p/3519439#M135178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-07T09:14:49Z</dc:date>
    </item>
  </channel>
</rss>

