<?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: Count of ID with filters based on a different column - Values incorrect in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4064021#M161336</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="491338" data-lia-user-login="adudani" class="lia-mention lia-mention-user"&gt;adudani&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="777262" data-lia-user-login="SachinNandanwar" class="lia-mention lia-mention-user"&gt;SachinNandanwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your assistance. I've replied earlier to your message but somehow it looks like it was not saved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain the problem a bit better.&lt;/P&gt;&lt;P&gt;I want to count the number of trips. I use the following formula to do that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Total Inspections = DISTINCTCOUNTNOBLANK('Inspections'[Trip Inspection Id])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AND I want to see how many inspections by catgory and group there are.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So the hierachy is as follows:&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1.&lt;EM&gt; Inspection Group&lt;/EM&gt; (Administrative / Physical)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. &lt;EM&gt;Inspection Category&lt;/EM&gt;&amp;nbsp;(there is a list of different categories which are split into these two groups.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now, &lt;STRONG&gt;the problem&lt;/STRONG&gt; seems to be that the sum of inspections by i&lt;EM&gt;nspection category&lt;/EM&gt; is different than the sum by &lt;EM&gt;inspection group.&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;The reason&amp;nbsp;&lt;/STRONG&gt;that this problem happens is that per inspection visit (inspection ID) there can be a number of several categories included. For example: the inspector goes out to inspect 3 different categories. Two of them are Physical and 1 is Administrative. With the DistinctCount this is counted as 2 inspections but should only be one.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If there both Inspection Categories are present then this should be counted as a Physical Inspection type.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I have to somehow filter out the the Admin group when both categories apply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that makes sense. It's very hard to explain, but the short of it is that if both groups are included only the Physical Group should be counted for a particular inspection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again, Sandra&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Trip Inspection Id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Inspection Group&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Inspection Category&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;7230829588&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;Administrative&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;Cross Checks&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;7230829588&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;Physical&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;Demersal Landings&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829588&lt;/TD&gt;&lt;TD&gt;Physical&lt;/TD&gt;&lt;TD&gt;Multiannual Plan Species&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829543&lt;/TD&gt;&lt;TD&gt;Administrative&lt;/TD&gt;&lt;TD&gt;Cross Checks&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829543&lt;/TD&gt;&lt;TD&gt;Physical&lt;/TD&gt;&lt;TD&gt;Demersal Landings&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829543&lt;/TD&gt;&lt;TD&gt;Physical&lt;/TD&gt;&lt;TD&gt;Multiannual Plan Species&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230600288&lt;/TD&gt;&lt;TD&gt;Administrative&lt;/TD&gt;&lt;TD&gt;Administrative/Non-Landing&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230555293&lt;/TD&gt;&lt;TD&gt;Administrative&lt;/TD&gt;&lt;TD&gt;Cross Checks&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Fri, 26 Jul 2024 14:57:46 GMT</pubDate>
    <dc:creator>SCallanan</dc:creator>
    <dc:date>2024-07-26T14:57:46Z</dc:date>
    <item>
      <title>Count of ID with filters based on a different column - Values incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4061816#M161232</link>
      <description>&lt;P&gt;Hi guys,&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; or anyone who can help... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;first of all, thanks for having me...&lt;/P&gt;&lt;P&gt;my issue is the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to distinctcount the no of Trip Id's and filter by the inspection group.&lt;BR /&gt;The problem is that this does not add up. I know what the issue is. Some trips can be admin and physical, which are both under the same column header. (Same trip Id twice) In those cases only the physical trip but not the admin trip should be counted. I tried filtering on multiple criteria, but it does not work, probably because it is all under the same column header.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how to fix this? Much obliged. Sandra&amp;nbsp;&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;&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;I can create a measure which counts if either of those criteria is applicable:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;but when I try to create a measure that counts only the cases where both conditions apply, it does not work:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The measure is correct, but the card value shows blank even though there are cases that both criteria apply.&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 15:56:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4061816#M161232</guid>
      <dc:creator>SCallanan</dc:creator>
      <dc:date>2024-07-25T15:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count of ID with filters based on a different column - Values incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4062108#M161247</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Intially you mentioned that&lt;BR /&gt;&lt;BR /&gt;"Some trips can be admin and physical, which are both under the same column header. (Same trip Id twice) In those cases only the physical trip but not the admin trip should be&lt;BR /&gt;counted."&lt;BR /&gt;&lt;BR /&gt;and then you stated&lt;BR /&gt;&lt;BR /&gt;"when I try to create a measure that counts only the cases where both conditions apply"&lt;BR /&gt;&lt;BR /&gt;i think there are some discrepancies between the two.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 18:44:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4062108#M161247</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-07-25T18:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count of ID with filters based on a different column - Values incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4062185#M161251</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Kindly provide the sample input/output in a usable format (excel, csv, table etc.) masking sensitive information.&lt;BR /&gt;&lt;BR /&gt;reference : &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M607150" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M607150&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 20:23:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4062185#M161251</guid>
      <dc:creator>adudani</dc:creator>
      <dc:date>2024-07-25T20:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count of ID with filters based on a different column - Values incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4064021#M161336</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="491338" data-lia-user-login="adudani" class="lia-mention lia-mention-user"&gt;adudani&lt;/a&gt;&amp;nbsp;;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="777262" data-lia-user-login="SachinNandanwar" class="lia-mention lia-mention-user"&gt;SachinNandanwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your assistance. I've replied earlier to your message but somehow it looks like it was not saved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain the problem a bit better.&lt;/P&gt;&lt;P&gt;I want to count the number of trips. I use the following formula to do that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Total Inspections = DISTINCTCOUNTNOBLANK('Inspections'[Trip Inspection Id])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AND I want to see how many inspections by catgory and group there are.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So the hierachy is as follows:&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1.&lt;EM&gt; Inspection Group&lt;/EM&gt; (Administrative / Physical)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. &lt;EM&gt;Inspection Category&lt;/EM&gt;&amp;nbsp;(there is a list of different categories which are split into these two groups.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now, &lt;STRONG&gt;the problem&lt;/STRONG&gt; seems to be that the sum of inspections by i&lt;EM&gt;nspection category&lt;/EM&gt; is different than the sum by &lt;EM&gt;inspection group.&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;The reason&amp;nbsp;&lt;/STRONG&gt;that this problem happens is that per inspection visit (inspection ID) there can be a number of several categories included. For example: the inspector goes out to inspect 3 different categories. Two of them are Physical and 1 is Administrative. With the DistinctCount this is counted as 2 inspections but should only be one.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If there both Inspection Categories are present then this should be counted as a Physical Inspection type.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I have to somehow filter out the the Admin group when both categories apply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that makes sense. It's very hard to explain, but the short of it is that if both groups are included only the Physical Group should be counted for a particular inspection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again, Sandra&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Trip Inspection Id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Inspection Group&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Inspection Category&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;7230829588&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;Administrative&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;Cross Checks&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;7230829588&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF00FF"&gt;Physical&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;Demersal Landings&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829588&lt;/TD&gt;&lt;TD&gt;Physical&lt;/TD&gt;&lt;TD&gt;Multiannual Plan Species&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829543&lt;/TD&gt;&lt;TD&gt;Administrative&lt;/TD&gt;&lt;TD&gt;Cross Checks&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829543&lt;/TD&gt;&lt;TD&gt;Physical&lt;/TD&gt;&lt;TD&gt;Demersal Landings&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230829543&lt;/TD&gt;&lt;TD&gt;Physical&lt;/TD&gt;&lt;TD&gt;Multiannual Plan Species&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230600288&lt;/TD&gt;&lt;TD&gt;Administrative&lt;/TD&gt;&lt;TD&gt;Administrative/Non-Landing&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7230555293&lt;/TD&gt;&lt;TD&gt;Administrative&lt;/TD&gt;&lt;TD&gt;Cross Checks&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 26 Jul 2024 14:57:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-ID-with-filters-based-on-a-different-column-Values/m-p/4064021#M161336</guid>
      <dc:creator>SCallanan</dc:creator>
      <dc:date>2024-07-26T14:57:46Z</dc:date>
    </item>
  </channel>
</rss>

