<?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 Summarizing numbers over Distinct values in DAX Power BI in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2710802#M37983</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am having trouble receiving correct result when trying to sum numbers over Distinct values (in DAX Power BI)&lt;/P&gt;&lt;P&gt;I have the following table - Tbl_Eposode:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data.PNG" style="width: 418px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/768065i932CB926EF925BBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Data.PNG" alt="Data.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect to have total numbers of [Episode] = 12&lt;/P&gt;&lt;P&gt;But I keep having SUM of [Episode] = 36 (my code just summarizes all Episode values instead only summarizing unique Episodes (by EpisodeID, ProgramID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Pre Homeless Days = CALCULATE(SUM('Tbl_Episode'[Episode]), ALLEXCEPT('Tbl_Episode','Tbl_Episode'[EpisodeID],'Tbl_Episode'[ProgramID],'Tbl_Episode'[ClientID]))&lt;/LI-CODE&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;PLEASE HELP!&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, 18 Aug 2022 20:05:08 GMT</pubDate>
    <dc:creator>Hell-1931</dc:creator>
    <dc:date>2022-08-18T20:05:08Z</dc:date>
    <item>
      <title>Summarizing numbers over Distinct values in DAX Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2710802#M37983</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am having trouble receiving correct result when trying to sum numbers over Distinct values (in DAX Power BI)&lt;/P&gt;&lt;P&gt;I have the following table - Tbl_Eposode:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data.PNG" style="width: 418px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/768065i932CB926EF925BBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Data.PNG" alt="Data.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect to have total numbers of [Episode] = 12&lt;/P&gt;&lt;P&gt;But I keep having SUM of [Episode] = 36 (my code just summarizes all Episode values instead only summarizing unique Episodes (by EpisodeID, ProgramID))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Pre Homeless Days = CALCULATE(SUM('Tbl_Episode'[Episode]), ALLEXCEPT('Tbl_Episode','Tbl_Episode'[EpisodeID],'Tbl_Episode'[ProgramID],'Tbl_Episode'[ClientID]))&lt;/LI-CODE&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;PLEASE HELP!&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, 18 Aug 2022 20:05:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2710802#M37983</guid>
      <dc:creator>Hell-1931</dc:creator>
      <dc:date>2022-08-18T20:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing numbers over Distinct values in DAX Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2711511#M37989</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/164287"&gt;@Hell-1931&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tryt the below measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;Measure = 
var _distinct = DISTINCT(VALUES('Table'))
RETURN
SUMX(_distinct, 'Table'[Episode])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV&gt;&lt;STRONG&gt;Did I answer your question? Then please mark my post as the solution.&lt;BR /&gt;If I helped you, click on the Thumbs Up to give Kudos.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://dataap.org/blog/author/hariharanr/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;My Blog&lt;/STRONG&gt;&lt;/A&gt; :: &lt;A href="https://www.youtube.com/c/HarisBI" target="_blank" rel="nofollow noopener noreferrer"&gt;YouTube Channel&lt;/A&gt; :: &lt;A href="https://www.linkedin.com/in/imhariharanr/" target="_blank" rel="nofollow noopener noreferrer"&gt;My Linkedin&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Aug 2022 04:45:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2711511#M37989</guid>
      <dc:creator>Hariharan_R</dc:creator>
      <dc:date>2022-08-19T04:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing numbers over Distinct values in DAX Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2718875#M38100</link>
      <description>&lt;P&gt;Unfortunately,&amp;nbsp; it keeps resulting in 36 not 12&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 05:15:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2718875#M38100</guid>
      <dc:creator>Hell-1931</dc:creator>
      <dc:date>2022-08-23T05:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing numbers over Distinct values in DAX Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2721861#M38123</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/164287"&gt;@Hell-1931&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Is there any other field exist in your fact table except the fields in below screenshot? It can get the correct result: &lt;FONT color="#008080"&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/FONT&gt; when I use the same formula as suggested by&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/118918"&gt;@Hariharan_R&lt;/a&gt;&amp;nbsp;....&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1661307196744.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/770934iC27DCF225BD9D460/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yingyinr_0-1661307196744.png" alt="yingyinr_0-1661307196744.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In addition, you can refer the following links to get it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DAX&lt;/STRONG&gt; method:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Calculate-the-sum-of-Duplicate-values-from-a-Table/m-p/609311" target="_self"&gt;&lt;SPAN&gt;Calculate the sum of Duplicate values from a Table&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SizeWithoutDuplicates =
SUMX (
    DISTINCT ( unstructured[Hash] ),
    CALCULATE(DISTINCT(unstructured[Size]))
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/43547620/sum-distinct-values-for-first-occurance-in-power-bi" target="_self"&gt;&lt;SPAN&gt;Sum distinct values for first occurance in Power BI&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total = SUMX(DISTINCT(Data[Name]), FIRSTNONBLANK(Data[Value], 0))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_2-1661308190102.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/770943iA67B714C42C4E848/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_2-1661308190102.png" alt="yingyinr_2-1661308190102.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Power Quer&lt;/STRONG&gt;y method:&lt;/P&gt;
&lt;P&gt;&lt;A style="background-color: #ffffff; outline: 0px;" href="https://community.powerbi.com/t5/Desktop/How-to-combine-duplicate-rows-and-sum-its-values/td-p/2162276" target="_self"&gt;&lt;SPAN&gt;How to combine duplicate rows and sum its values&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_1-1661308128229.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/770940i7102246408B8EFE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yingyinr_1-1661308128229.png" alt="yingyinr_1-1661308128229.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If the above one can't help you get the desired result, please provide more&amp;nbsp;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;&lt;I&gt;exclude&amp;nbsp;&lt;/I&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;sensitive&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;I&gt;data&lt;/I&gt;&lt;/STRONG&gt;) with&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Text&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples&lt;FONT color="#FF0000"&gt;.&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;It is better&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;simplified&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; box-sizing: border-box; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 02:30:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2721861#M38123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-24T02:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing numbers over Distinct values in DAX Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2737217#M38266</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/164287"&gt;@Hell-1931&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Whether your problem has been resolved? If yes, could you please mark the helpful post as &lt;STRONG&gt;&lt;SPAN&gt;Answered&lt;/SPAN&gt;&lt;/STRONG&gt;? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 07:13:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Summarizing-numbers-over-Distinct-values-in-DAX-Power-BI/m-p/2737217#M38266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-31T07:13:50Z</dc:date>
    </item>
  </channel>
</rss>

