<?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: Duplicate Values Making Sub and Grand Totals Incorrect in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duplicate-Values-Making-Sub-and-Grand-Totals-Incorrect/m-p/993665#M12398</link>
    <description>&lt;P&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2020 16:30:41 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-03-26T16:30:41Z</dc:date>
    <item>
      <title>Duplicate Values Making Sub and Grand Totals Incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duplicate-Values-Making-Sub-and-Grand-Totals-Incorrect/m-p/993653#M12397</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate a sales value based upon id and stage being closed won.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my data the "ID" has duplicates, so what i want to do is get the total value of sales without it duplicating. I need to use a dax measure to achieve this.&amp;nbsp; For example an ID appears twice and it is doubling the sales value.&amp;nbsp; So with example below in my matrix it showing ID as 200 for the sales value, it should be 100 as this id has been duplicated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp; &amp;nbsp; &amp;nbsp; Sales Value&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have used the below to get the show what IDs have been duplicated:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure 1 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS(FILTER(VALUES(Table1[Id]),CALCULATE(COUNT(&lt;SPAN&gt;Table1[Id]&lt;/SPAN&gt;) &amp;gt; DISTINCTCOUNT(&lt;SPAN&gt;Table1[Id]&lt;/SPAN&gt;]))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have then used the below if statement to get my sales value:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF([Measure 1]=1,SUMX(table1,[Salesvalue])/2,SUMx(Table1,[SalesValue]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This has worked on a row level but not on a subtotal or grand total level. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any idea how i can get the correct values to show in the sub and grand totals?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:22:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duplicate-Values-Making-Sub-and-Grand-Totals-Incorrect/m-p/993653#M12397</guid>
      <dc:creator>antlufc</dc:creator>
      <dc:date>2020-03-26T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate Values Making Sub and Grand Totals Incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duplicate-Values-Making-Sub-and-Grand-Totals-Incorrect/m-p/993665#M12398</link>
      <description>&lt;P&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:30:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duplicate-Values-Making-Sub-and-Grand-Totals-Incorrect/m-p/993665#M12398</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-26T16:30:41Z</dc:date>
    </item>
  </channel>
</rss>

