<?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 CountIf-Type Function in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154495#M49717</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Schedule table&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Schedule date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot number&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12345&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23456&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Production table&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Production start date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot number&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12345&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10262021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23456&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want to count the number of lot numbers in the production table only if the start date for the production table matches the date in the schedule date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, we would only count 1 for Lot number 12345 because the production start date matches the date in the schedule date table. The lot number actually ran on the day that it was scheduled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far we've tried this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CountIf = COUNTROWS(FILTER(production_data,production_data[new_plot_no]=schedule_date,schedule_date[new_slot_no]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on this starting point from class:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Countrows(filter(schedule data, lot_no_new(#####)=&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 22:36:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-10-25T22:36:35Z</dc:date>
    <item>
      <title>CountIf-Type Function in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154495#M49717</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Schedule table&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Schedule date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot number&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12345&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23456&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Production table&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Production start date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot number&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12345&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10262021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23456&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want to count the number of lot numbers in the production table only if the start date for the production table matches the date in the schedule date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, we would only count 1 for Lot number 12345 because the production start date matches the date in the schedule date table. The lot number actually ran on the day that it was scheduled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far we've tried this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CountIf = COUNTROWS(FILTER(production_data,production_data[new_plot_no]=schedule_date,schedule_date[new_slot_no]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on this starting point from class:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Countrows(filter(schedule data, lot_no_new(#####)=&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 22:36:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154495#M49717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-25T22:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: CountIf-Type Function in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154571#M49721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this measure:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Measure = 
VAR _A =
    FILTER (
        ADDCOLUMNS (
            production_data,
            "Sche-Date",
                LOOKUPVALUE (
                    schedule_date[Schedule date],
                    schedule_date[Lot number], production_data[Lot number]
                )
        ),
        [Production start date] = [Sche-Date]
    )
RETURN
    COUNTROWS ( _A )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos!!&lt;/STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 00:51:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154571#M49721</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-10-26T00:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: CountIf-Type Function in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154694#M49726</link>
      <description>&lt;P&gt;This is great, thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 02:26:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2154694#M49726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-26T02:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: CountIf-Type Function in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2159436#M49928</link>
      <description>&lt;P&gt;Hello again! Is there a way to extract those lot numbers that were counted? So instead of counting the lots I would be able to see which lots were run?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is another column of the data I'm using. The end goal is to create card visualizations counting the number of lots based on type. "count of type A lots that actually ran on the date they were supposed to" "count of type B lots that actually ran on the date they were supposed to", etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Schedule table&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Schedule date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot number&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot Type&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12345&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23456&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;B&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Production table&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Production start date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot number&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Lot type&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10252021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12345&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;10262021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;23456&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;B&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2021 01:08:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/CountIf-Type-Function-in-DAX/m-p/2159436#M49928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-28T01:08:12Z</dc:date>
    </item>
  </channel>
</rss>

