<?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: Aggregate grouping rollup sum in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2298196#M68280</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351131" data-lia-user-login="rtech2022" class="lia-mention lia-mention-user"&gt;rtech2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please&amp;nbsp;kindly &lt;EM&gt;&lt;STRONG&gt;Accept my helpful reply as the solution&lt;/STRONG&gt;&lt;/EM&gt; to make the thread. More people will benefit from it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And actually I'd suggest you create a new thread for your second issue to get further help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 09:32:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-01-24T09:32:53Z</dc:date>
    <item>
      <title>Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279071#M67563</link>
      <description>&lt;P&gt;Hi there, looking for suggestions to get a aggregated sum based on a defined grouping. In this example, i would like to see the grouping by ProdDate + Shift&lt;/P&gt;&lt;P&gt;I tried using the summarize function.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired output would look like this ..&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Table relationship&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can provide the sample .pbix if that easier to provide feedback.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 08:42:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279071#M67563</guid>
      <dc:creator>rtech2022</dc:creator>
      <dc:date>2022-01-12T08:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279469#M67574</link>
      <description>&lt;P&gt;Yes please, link the pbix and i'll have a look&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:06:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279469#M67574</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2022-01-12T13:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279498#M67576</link>
      <description>&lt;P&gt;Thank you, pbix file attached.&lt;/P&gt;&lt;P&gt;&lt;A title="sample_prod.pbix" href="https://www.dropbox.com/s/zu35wf0bscynrh9/sample_prod.pbix?dl=0" target="_self"&gt;sample_prod.pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:19:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279498#M67576</guid>
      <dc:creator>rtech2022</dc:creator>
      <dc:date>2022-01-12T13:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279503#M67577</link>
      <description>&lt;P&gt;File attached - thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 13:22:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2279503#M67577</guid>
      <dc:creator>rtech2022</dc:creator>
      <dc:date>2022-01-12T13:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2288411#M67957</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351131" data-lia-user-login="rtech2022" class="lia-mention lia-mention-user"&gt;rtech2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to get the sum of [&lt;SPAN style="font-family: inherit;"&gt;prod_target] for each shift, your final output should be&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;for D——4365.16+4583.42=8948.59 ， for N ——4583.42. Actually I'm confused why N is 9166.84.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My method:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _t= SUMMARIZE(FILTER(ALLSELECTED('tbl_Mining'),[Shift]=MAX('tbl_Mining'[Shift])),"sum of each shift",SUM('tbl_Target'[Production Target]))
return SUMX(_t,[sum of each shift])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 08:34:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2288411#M67957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-18T08:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2288566#M67961</link>
      <description>&lt;P&gt;Thank you Evelyn, that has resolved my issue in calculating the shift target. You were correct the value for N should have been 4583.42.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that we have the shift target which is the measure we calculated. I can calculate the Split Bench Ratio using :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Split Bench Ratio % =&lt;BR /&gt;DIVIDE([Prod Target], [Shift_Target])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI: Prod Target =&lt;BR /&gt;VAR __BASELINE_VALUE = SUM('Target'[Production Target])&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;HASONEVALUE(Mining[From Location]),&lt;BR /&gt;__BASELINE_VALUE, SUMX(VALUES(Mining[ProdDate]), __BASELINE_VALUE))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Weighted Shift Target =&lt;BR /&gt;[Prod Target] * Mining[Split Bench Ratio %]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next challenge i have is calculating the BCM Var Weighted ..&lt;/P&gt;&lt;P&gt;The logic should be simple as&amp;nbsp; (Mining[BCM] -Weighted Shift Target )/Weighted Shift Target&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what i am getting -&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the output i am working towards .. and stuck on the calculations for ..&lt;/P&gt;&lt;P&gt;Weighted BCM Var%&lt;/P&gt;&lt;P&gt;AVG Weighted BCM Var%&lt;/P&gt;&lt;P&gt;Daily Average&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 10:00:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2288566#M67961</guid>
      <dc:creator>rtech2022</dc:creator>
      <dc:date>2022-01-18T10:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2290339#M68032</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351131" data-lia-user-login="rtech2022" class="lia-mention lia-mention-user"&gt;rtech2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Weighted BCM Var% = (SUM('tbl_Mining'[BCM])-[Weighted Shift Target] ) /[Weighted Shift Target]&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;AVG Weighted BCM Var% = 
var _t=  SUMMARIZE(ALLSELECTED('tbl_Mining'),[Shift],[FromLocation],"%",[Weighted BCM Var%])
return AVERAGEX(FILTER(_t,[Shift]=MAX('tbl_Mining'[Shift])),[%])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;AVG Weighted BCM Var% = 
var _t=  SUMMARIZE(ALLSELECTED('tbl_Mining'),[Shift],[FromLocation],"%",[Weighted BCM Var%])
return AVERAGEX(FILTER(_t,[Shift]=MAX('tbl_Mining'[Shift])),[%])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&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;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 06:40:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2290339#M68032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-19T06:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2292529#M68106</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It's very close - any suggestions on how to get the totals to sum correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried something like this but it did not work.&lt;/P&gt;&lt;P&gt;Weighted Shift Target1 =&lt;BR /&gt;--[Prod Target] * [Split Bench Ratio %]&lt;BR /&gt;VAR T1=[Weighted Shift Target]&lt;BR /&gt;VAR T5 =SUMMARIZE (&lt;BR /&gt;FILTER(ALLSELECTED('tbl_Mining'),[Shift]=MAX('tbl_Mining'[Shift]) &amp;amp;&amp;amp; [ProdDate]=MAX('tbl_Mining'[ProdDate]))&lt;BR /&gt;,'tbl_Mining'[ProdDate]&lt;BR /&gt;,'tbl_Mining'[Shift]&lt;BR /&gt;-- ,'tbl_Mining'[FromLocation]&lt;BR /&gt;, "SPLIT1", [Weighted Shift Target]) --Shift Target&lt;/P&gt;&lt;P&gt;return&lt;BR /&gt;IF (HASONEVALUE('tbl_Mining'[ProdDate]),&lt;BR /&gt;SUMX(T5, [SPLIT1] ),&lt;BR /&gt;SUMX(T5, [SPLIT1] ))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 04:08:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2292529#M68106</guid>
      <dc:creator>rtech2022</dc:creator>
      <dc:date>2022-01-20T04:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate grouping rollup sum</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2298196#M68280</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351131" data-lia-user-login="rtech2022" class="lia-mention lia-mention-user"&gt;rtech2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please&amp;nbsp;kindly &lt;EM&gt;&lt;STRONG&gt;Accept my helpful reply as the solution&lt;/STRONG&gt;&lt;/EM&gt; to make the thread. More people will benefit from it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And actually I'd suggest you create a new thread for your second issue to get further help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Eyelyn Qin&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 09:32:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Aggregate-grouping-rollup-sum/m-p/2298196#M68280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-24T09:32:53Z</dc:date>
    </item>
  </channel>
</rss>

