<?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: Why is Count and Distinctcount together with Calculate giving a negative number? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783975#M147809</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLease give us some data samples&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2024 20:05:44 GMT</pubDate>
    <dc:creator>JamesFR06</dc:creator>
    <dc:date>2024-03-21T20:05:44Z</dc:date>
    <item>
      <title>Why is Count and Distinctcount together with Calculate giving a negative number?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783972#M147807</link>
      <description>&lt;P&gt;I'm writing some formulas that use the Count or Distinctcountnoblank functions, but when I combine them with Calculate to filter based on a condition in the data, it returns a negative number for some of the measures but not all. Whether it's positive or negative seems to vary with the condition applied. See below for an example where I'm trying to output the count of call_id whose call type is "123". How is it even possible for this to return a negative number? How do I make it work properly without having to do a series of IF/THEN clauses?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure Example =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(DISTINCTCOUNTNOBLANK(table[call_id])&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt;[type]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"123"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Mar 2024 20:01:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783972#M147807</guid>
      <dc:creator>pbi95</dc:creator>
      <dc:date>2024-03-21T20:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count and Distinctcount together with Calculate giving a negative number?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783975#M147809</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLease give us some data samples&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 20:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783975#M147809</guid>
      <dc:creator>JamesFR06</dc:creator>
      <dc:date>2024-03-21T20:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count and Distinctcount together with Calculate giving a negative number?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783984#M147810</link>
      <description>&lt;P&gt;The call_id values are just random numbers from 5 to 7 characters in length serving as an identifier column. It shouldn't affect the results of Count and Countdistinctnoblank. The output I'm getting from the measure example is -24.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 20:13:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3783984#M147810</guid>
      <dc:creator>pbi95</dc:creator>
      <dc:date>2024-03-21T20:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count and Distinctcount together with Calculate giving a negative number?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3784002#M147812</link>
      <description>&lt;P&gt;Ok for me your measure is ok. so I do not understand why you have negative results&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 20:24:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3784002#M147812</guid>
      <dc:creator>JamesFR06</dc:creator>
      <dc:date>2024-03-21T20:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count and Distinctcount together with Calculate giving a negative number?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3784451#M147837</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="646345" data-lia-user-login="pbi95" class="lia-mention lia-mention-user"&gt;pbi95&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please provide more&amp;nbsp;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;&lt;EM&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/EM&gt;&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples?&amp;nbsp;It would be helpful to find out the solution. You can refer the following links to share the required info:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=EJlYfclgtrjgAEYj9Uo1AauqxaQm3hlQsjJMo4zCY1M%3D&amp;amp;reserved=0" target="_blank"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=7UEf71Mu2ySWC7MlgciaPViM1RqU5nx4OHGHG5EvNSw%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/P&gt;
&lt;P&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"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 02:44:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Why-is-Count-and-Distinctcount-together-with-Calculate-giving-a/m-p/3784451#M147837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-22T02:44:58Z</dc:date>
    </item>
  </channel>
</rss>

