<?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: Measure Totals, The Final Word in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/3781125#M1069</link>
    <description>&lt;P&gt;Hey, I've tried this method and it worked for two columns. The totals for Joined Adjust and Offered Adjust are now correct.&lt;/P&gt;&lt;P&gt;However, if you sum up the rows in the Offer Adjust TOTAL, it's not adding up the values "3" and "2" (highlighted in yellow) in the total. The total should be 41, not 36.&lt;/P&gt;&lt;P&gt;I used the same formula as the ones used in the Joined Adjust Total and Offered Adjust column.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2024 02:31:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-21T02:31:35Z</dc:date>
    <item>
      <title>Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907#M239</link>
      <description>&lt;P&gt;With apologies to Theodor Geisel...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Measure totals have you perturbed?&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Fear not!&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;It's Measure Totals, The Final Word,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;These measures work with matrices,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;They work with tables,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;They work with rows and columns and labels.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;They work in the daytime,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;They work at night,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;They work to make sure the totals are right!&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now that you've seen them,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Now that you've heard,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Shout it out loud, it's Measure Totals, The Final Word!&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At some point, we've all been frustrated by measure totals. If you want to understand why, read &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_self"&gt;this post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The technique employed here is fairly simple and should work in all "standard" cases of where you just want the Total line to, well, display the total (sum) of a measure. For more complex scenarios, see my &lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-Roll/m-p/411443" target="_self"&gt;Matrix Measure Total Triple Threat Rock &amp;amp; Roll &lt;/A&gt;measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially, create a measure, any measure, that performs your desired calculation and returns the correct result at the row level. This becomes your "m_Single" measure. Now, create an "m_Total" measure that performs a SUMMARIZE of your data, exactly as how it is displayed in your table or matrix and use the "m_Single" measure within that SUMMARIZE statement to provide the values for the individually summarized rows. Finally, perform a SUMX across that summarized table. The measures presented in this PBIX file also do a HASONEVALUE check that isn't really necessary in most cases but perhaps lends a little confidence to the user that the SUMX is only employed in the Total line and might also add some performance improvements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In effect, you are recreating the displayed visualization in memory as a table and then doing a summation across that table for the total line, as you would intuitively expect a total line in a table or matrix to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if we have a measure like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;m_Single = SUM(Table1[Value])-50&lt;/PRE&gt;
&lt;P&gt;This measure will cause problems in total lines. So, if we are summarizing by [Name], we create this measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;m_Total 1 = 
VAR __table = SUMMARIZE('Table1',[Name],"__value",[m_Single])
RETURN
IF(HASONEVALUE(Table1[Name]),[m_Single],SUMX(__table,[__value]))&lt;/PRE&gt;
&lt;P&gt;If we are summarizing by [Category1], we create this measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;m_Total 2 = 
VAR __table = SUMMARIZE('Table1',[Category1],"__value",[m_Single])
RETURN
IF(HASONEVALUE(Table1[Category1]),[m_Single],SUMX(__table,[__value]))&lt;/PRE&gt;
&lt;P&gt;And so on...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We use these "m_Total" measures in our visualizations. The "m_Single" measure is still used, but not directly in the visuals themselves.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it annoying to have to create multiple measures and specifically tailor them to each individual visual? Yes, yes it is.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiODBmNmI4YjItZTMwYi00ZDU4LTg0MWItMzYyZWU3ODk4ZWI4IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 20:16:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907#M239</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-04-01T20:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/549898#M240</link>
      <description>&lt;P&gt;Awesome stuff.&amp;nbsp; I look forward to digging into this more.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 13:42:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/549898#M240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-23T13:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/552854#M242</link>
      <description>&lt;P&gt;Wow.&amp;nbsp; This also worked with AVERAGEX.&amp;nbsp; Now I just have to understand why it works! :)&amp;nbsp; Thank you so much.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 00:31:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/552854#M242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-26T00:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/553537#M243</link>
      <description>&lt;P&gt;This has got to be&amp;nbsp;the biggest oversight of Power BI is the lack of an elegent solution to handling totals.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 12:01:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/553537#M243</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-26T12:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/587113#M279</link>
      <description>&lt;P&gt;What happens if the if the "Categories" come from different tables, would the summarize work too?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 19:41:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/587113#M279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-17T19:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/587139#M280</link>
      <description>&lt;P&gt;Yes, should not matter if the categories come from another table. As long as the things are related properly on the backend in the model, everything should work just the same.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 20:23:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/587139#M280</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-12-17T20:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/592083#M281</link>
      <description>&lt;P&gt;Hi Greg,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great stuff,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With drilldown and TOPN the totals doesn't work properly to repent the total of TOPN ative dimension at current drilldown level,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you take a look on this link that i published in Power BI Forum:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/MATRIX-GrandTotal-calculation-with-TOPN-multiples-dimensions-in/m-p/586735#M278100" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/MATRIX-GrandTotal-calculation-with-TOPN-multiples-dimensions-in/m-p/586735#M278100&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;José Pintor&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 17:39:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/592083#M281</guid>
      <dc:creator>JosePintor</dc:creator>
      <dc:date>2018-12-27T17:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/621845#M295</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;. really awesome post! I hope to see more of this kind of posts in this community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've got a question for you, this has been killing me for a while.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a "Purchases" table, in whic I want to know the "price" of every item I buy. This is possible by making this simple measure: &lt;BR /&gt;&lt;STRONG&gt;SUM(table[import]) / SUM(table[Quantity]). &lt;/STRONG&gt;Divide the sum of the purchase with the quantity of that item bought. Now, I'm trying to compare "Price this month" with "Price last month" in which I ASUME that, I need to make two different measures to know that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Price this month =&lt;/STRONG&gt; &lt;STRONG&gt;CALCULATE ( SUM(table[import]) / SUM([Quantity]), CalendarTable[Relative_Month]="This month")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Price last month = CALCULATE ( SUM(table[import]) / SUM([Quantity]), CalendarTable[Relative_Month]="Last month")&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, the next thing I would LOVE to know is "Impact" between those prices, I mean, I need to calculate&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Impact = Price this month - Price last month * SUM(table[Quantity])&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It works fine in a table visual, because in table, it is showed by item. And if I export that data to a CSV file, and I do the sum by myself, it shows the correct result, attached is the excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT, when I see the &lt;STRONG&gt;TOTAL&lt;/STRONG&gt; at the end of the visual it is wrong, and I need it as a Card Visual, so when I put that measure in a Card Visual it shows the wrong result and I have no way to use different filters on it. Attached is the current result I have.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Another comments= &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;- Sometimes, "price this month" or "price last month" is in blank.&lt;/P&gt;
&lt;P&gt;- I already tried applying your measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="color: #000000; background-color: #fffffe; font-family: Consolas; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;c_Impacto real = &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;VAR __table = SUMMARIZE(table,table[item],"__value",[Impact])&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;RETURN&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;IF(HASONEVALUE(table[item]),[Impact],SUMX(__table,[__value]))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;I'd really appriciate your help, or another's help, this been killing me for a big while&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THANK YOU SO MUCH!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 16:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/621845#M295</guid>
      <dc:creator>omarevp</dc:creator>
      <dc:date>2019-02-12T16:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/657831#M327</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;you don't want to know how much time took me to find this treasure:)&lt;/P&gt;
&lt;P&gt;Thanks a lot!&lt;BR /&gt;Cosmin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:11:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/657831#M327</guid>
      <dc:creator>cosminc</dc:creator>
      <dc:date>2019-03-29T16:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/657854#M328</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;i used this and works wonderful&lt;/P&gt;
&lt;PRE&gt;m_Total 1 = 
VAR __table = SUMMARIZE('Table1',[Name],"__value",[m_Single])
RETURN
IF(HASONEVALUE(Table1[Name]),[m_Single],SUMX(__table,[__value]))&lt;/PRE&gt;
&lt;P&gt;but you have any idea how can i obtain a evolution of this measure vs same period last year for the same [Name] items?&lt;/P&gt;
&lt;P&gt;i calculated a top 20 for 2019 YTD and i need to compare with same 20 items vs last year same period (not top 20 from last year)&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Cosmin&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:37:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/657854#M328</guid>
      <dc:creator>cosminc</dc:creator>
      <dc:date>2019-03-29T16:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/669173#M337</link>
      <description>&lt;P&gt;AMAZING! thanks to you a lot!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2019 03:43:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/669173#M337</guid>
      <dc:creator>AlejandroPCar</dc:creator>
      <dc:date>2019-04-13T03:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/674388#M338</link>
      <description>&lt;P&gt;I'm still trying to get this, and I just cannot wrap my head around it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 14:43:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/674388#M338</guid>
      <dc:creator>tkrupka</dc:creator>
      <dc:date>2019-04-21T14:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/674393#M339</link>
      <description>&lt;P&gt;Nevermind,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Trial = 
IF(ISFILTERED(GeneratorNames[GeneratorName])&amp;amp;&amp;amp;ISFILTERED(RunData[Date])&amp;amp;&amp;amp;ISFILTERED(Locations[Location])&amp;amp;&amp;amp;ISFILTERED(IBXs[IBX_Name]),
SUMX(RunData,[Engine Run Time]*SUMX(GeneratorNames,GeneratorNames[FuelRate])),
VAR __table = SUMMARIZE(RunData,Locations[Location],IBXs[IBX_Name],GeneratorNames[GeneratorName],RunData[Date],"__value",SUMX(RunData,[Engine Run Time]*SUMX(GeneratorNames,GeneratorNames[FuelRate])))
RETURN
IF(ISFILTERED(GeneratorNames[GeneratorName])&amp;amp;&amp;amp;ISFILTERED(RunData[Date])&amp;amp;&amp;amp;ISFILTERED(Locations[Location])&amp;amp;&amp;amp;ISFILTERED(IBXs[IBX_Name]),
SUMX(RunData,[Engine Run Time]*SUMX(GeneratorNames,GeneratorNames[FuelRate])),SUMX(__table,[__value])))&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Apr 2019 14:59:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/674393#M339</guid>
      <dc:creator>tkrupka</dc:creator>
      <dc:date>2019-04-21T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/677786#M340</link>
      <description>&lt;P&gt;How can one apply this solution to a measure that references two additional measures, as shown below?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Lost Customers = IF([Total Orders]&amp;gt;0 &amp;amp;&amp;amp; [Last Period Orders]&amp;lt;=0&lt;/SPAN&gt;&lt;SPAN&gt; ,1&lt;/SPAN&gt;&lt;SPAN&gt;,0)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;For your reference, below are the details of the two additional measures:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Total Orders = SUMX(RELATEDTABLE('Mfg Invoice Data-Mar'),'Mfg Invoice Data-Mar'[Quantity])&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Last Period Orders = CALCULATE(&lt;BR /&gt;SUM('Mfg Invoice Data-Mar'[Quantity]),&lt;BR /&gt;DATESBETWEEN(&lt;BR /&gt;'Mfg Invoice Data-Mar'[Creation Date].[Date],&lt;BR /&gt;DATEADD(LASTDATE('Mfg Invoice Data-Mar'[Creation Date].[Date]),-1*[Selected Period],DAY),&lt;BR /&gt;LASTDATE('Mfg Invoice Data-Mar'[Creation Date].[Date])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I am trying to show a total of Lost Customers but the total is outputting "1".&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Apr 2019 14:10:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/677786#M340</guid>
      <dc:creator>samiller71</dc:creator>
      <dc:date>2019-04-25T14:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/696982#M348</link>
      <description>&lt;P&gt;very helpfull, but there's something missing for me because doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have this measure&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Tot Costo/h = CALCULATE(SUMX(hr_analytic_timesheet;hr_analytic_timesheet[Ore])*MAX('Dipendenti Costo/H'[Costo H]))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;try with your solution&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Tot Costo/h_New =&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;VAR _table = SUMMARIZE(res_partner;[Partner];"_Value";[Tot Costo/h])&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;IF(HASONEVALUE(res_partner[Partner]);[Tot Costo/h];SUMX(_table;[_Value]))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;all the table are related&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 May 2019 08:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/696982#M348</guid>
      <dc:creator>mauroanelli</dc:creator>
      <dc:date>2019-05-22T08:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/773841#M383</link>
      <description>&lt;P&gt;Amazing! I just tried this Greg's solution after days of struggling with meassure totals for the first time and it worked perfectly. It is indeed amaizing that Microsoft hasn't come out with a solution of their won for this problem alredy coded in PBI, but this solution is a real wonder. Thanks so much Greg, you're a genious ! BTW, the poem is fantastic too! : )&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 05:16:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/773841#M383</guid>
      <dc:creator>maulopez</dc:creator>
      <dc:date>2019-08-23T05:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/781899#M385</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to calculate some average times and it works well, except the Totals. Each row represents a candidate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table I have looks like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;SPAN class="lia-message-image-wrapper lia-message-image-actions-narrow lia-message-image-actions-below"&gt;&lt;IMG class="lia-media-image" src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/189343i5BA53627FA9AE82E/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="PBIDesktop_HitMfMLmGk.png" title="PBIDesktop_HitMfMLmGk.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formula I use for the column in the middle is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;From Interview Scheduled to Offer = IF ( ISBLANK([_Average days to Offer]) || ISBLANK([_Average days to Interview - Scheduled]), BLANK(),([_Average days to Offer] - [_Average days to Interview - Scheduled]))&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;The purpose of it is to ignore the calculation if the other column is blank and if that applies to give a blank result. Which works perfectly, except for the TOTALS. Is there something I can add to my formula so that the total is blank also unless the same candidate has both values?&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The 1st and 3rd column are also calculations that apply to columns that contain whole numbers (number of days from application to Interview or Offer in this case) or null values, that apply to each candidate (as I said one row = 1 candidate)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;_Average days to Interview - Scheduled = CALCULATE( AVERAGE([_Days Application to Interview - Scheduled]), FILTER(report, report[_Days Application to Interview - Scheduled] &amp;lt;&amp;gt; 0 ))&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;_Average days to Offer = CALCULATE( AVERAGE([_Days Application to Offer]), FILTER(report, report[_Days Application to Offer] &amp;lt;&amp;gt; 0 ))&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;I might be missing something here, can you please help me implement the "HASONEVALUE" function? Maybe it would be a solution here.&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thank you very much!&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Sep 2019 06:47:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/781899#M385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-03T06:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/854296#M400</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I have a question regarding the use of a VAR in the summarization. In that case the result is wrong. I have to use a VAR due to a complex commission calculation based on different levels of revenue and % margin.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, if revenue &amp;gt; $250,000 and margin % is less than 56% but greater than 52% the commision % is 1%,&lt;/P&gt;
&lt;P&gt;with the same revenue limit if margin is less than 60% but greater than 56% the commission % is 1.5%, etc.&lt;/P&gt;
&lt;P&gt;To handle this calculation I created VAR as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Comision = 
VAR Sales= [Sales Total]
VAR Margin = [Margin Total]
VAR Commission = 
    SWITCH( TRUE(),
        Sales &amp;gt;= 200000 &amp;amp;&amp;amp; Sales &amp;lt; 250000, 0,
        Sales&amp;gt;= 250000 &amp;amp;&amp;amp; Margin &amp;gt;= 0.52 &amp;amp;&amp;amp; Margin &amp;lt; 0.56, 0.01,
        Sales&amp;gt;= 250000 &amp;amp;&amp;amp; Margin &amp;lt; 0.60, 0.015,
        Sales&amp;gt;= 250000 &amp;amp;&amp;amp; Margin &amp;gt;= 0.6, 0.02, 
    0
    )
VAR BaseBonus = 
    SWITCH( TRUE(),
        Sales&amp;gt;= 200000 &amp;amp;&amp;amp; Sales &amp;lt; 250000, 1000,
        0
    )
VAR CommissionAmount = Sales * Commission + BaseBonus
VAR ComisTotal = SUMMARIZE( VALUES( OCRD[SlpCode] ), OCRD[SlpCode], "ComisTot",  MAX( 0, CommissionAmount ) )
RETURN
SUMX( ComisTotal, [ComisTot] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At using a VAR after RETURN it gives a wrong total.&lt;/P&gt;
&lt;P&gt;I made a dummy data model to show this procedure &lt;A title="dummy pbix file" href="https://www.dropbox.com/s/eg9w3oifajz3y9p/total_final.pbix?dl=0" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Could you please advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fernando&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 13:53:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/854296#M400</guid>
      <dc:creator>calerof</dc:creator>
      <dc:date>2019-11-22T13:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/895190#M407</link>
      <description>&lt;P&gt;Do the formula work between two tables?&lt;/P&gt;
&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 16:22:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/895190#M407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T16:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Measure Totals, The Final Word</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/934769#M411</link>
      <description>&lt;P&gt;Thank you Greg. I was able to obtain the correct totals for a simple (yet critical) sum of absolute values calculation in Power Pivot by adapting your technique. What I thought would be a three second "wrap in ABS" formula turned into a three (12-hour) day nightmare. Cannot believe what I just went through to achieve what is literally the dead-simplest calculation mathematically possible. But can't thank you enough for this solution.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 03:45:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/934769#M411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-17T03:45:44Z</dc:date>
    </item>
  </channel>
</rss>

