<?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: Distinctcount with criteria in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956733#M98238</link>
    <description>&lt;P&gt;the values being compared are not of the same type.&amp;nbsp; try change to:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Active outbound = CALCULATE(
    DISTINCTCOUNT(sq01[PickedBy]),FILTER(sq01,sq01[PickStrt]&amp;gt;=TIME(3,0,0)),FILTER(sq01,sq01[PickStrt]&amp;lt;=TIME(13,30,0))&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 08 Dec 2022 12:51:56 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2022-12-08T12:51:56Z</dc:date>
    <item>
      <title>Distinctcount with criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956715#M98234</link>
      <description>&lt;P&gt;I need to count the total number of employees working on the floor.&amp;nbsp; The issue is they need to be devided up between shifts so it would have to be a distinctcount with a greater than or less than time criteria.&lt;/P&gt;&lt;P&gt;My employee column is [pickedby] and the time is [pickstrt].&lt;/P&gt;&lt;P&gt;This is the code I am using.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Active outbound = CALCULATE(
    DISTINCTCOUNT(sq01[PickedBy]),FILTER(sq01,sq01[PickStrt]&amp;gt;="03:00:00 AM"),FILTER(sq01,sq01[PickStrt]&amp;lt;="13:30:00 PM"))&lt;/LI-CODE&gt;&lt;P&gt;I am getting this error message though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error Message:&lt;BR /&gt;MdxScript(Model) (16, 47) Calculation error in measure 'sq01'[Active outbound]: DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can I do to fix it?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 12:40:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956715#M98234</guid>
      <dc:creator>Dean_Mcghee</dc:creator>
      <dc:date>2022-12-08T12:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Distinctcount with criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956733#M98238</link>
      <description>&lt;P&gt;the values being compared are not of the same type.&amp;nbsp; try change to:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Active outbound = CALCULATE(
    DISTINCTCOUNT(sq01[PickedBy]),FILTER(sq01,sq01[PickStrt]&amp;gt;=TIME(3,0,0)),FILTER(sq01,sq01[PickStrt]&amp;lt;=TIME(13,30,0))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 Dec 2022 12:51:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956733#M98238</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-08T12:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Distinctcount with criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956759#M98242</link>
      <description>&lt;P&gt;Thank You!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 13:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinctcount-with-criteria/m-p/2956759#M98242</guid>
      <dc:creator>Dean_Mcghee</dc:creator>
      <dc:date>2022-12-08T13:05:43Z</dc:date>
    </item>
  </channel>
</rss>

