<?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 Calculate today cases in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633268#M77114</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to count the number of cases for today and if there is an empty value, write zero.&lt;/P&gt;&lt;P&gt;I have already created these measures, but how to connect them together and create one measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Count_today =&lt;/STRONG&gt; CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ),&amp;nbsp;'case'[date] = TODAY ())&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Count_zero_value = &lt;/STRONG&gt;if(isblank(DISTINCTCOUNT(case[id_case])),0,DISTINCTCOUNT(case[id_case]))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 12 Jul 2022 09:54:58 GMT</pubDate>
    <dc:creator>Michael92</dc:creator>
    <dc:date>2022-07-12T09:54:58Z</dc:date>
    <item>
      <title>Calculate today cases</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633268#M77114</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to count the number of cases for today and if there is an empty value, write zero.&lt;/P&gt;&lt;P&gt;I have already created these measures, but how to connect them together and create one measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Count_today =&lt;/STRONG&gt; CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ),&amp;nbsp;'case'[date] = TODAY ())&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Count_zero_value = &lt;/STRONG&gt;if(isblank(DISTINCTCOUNT(case[id_case])),0,DISTINCTCOUNT(case[id_case]))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:54:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633268#M77114</guid>
      <dc:creator>Michael92</dc:creator>
      <dc:date>2022-07-12T09:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate today cases</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633301#M77120</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="411489" data-lia-user-login="Michael92" class="lia-mention lia-mention-user"&gt;Michael92&lt;/a&gt; ,&lt;BR /&gt;&lt;BR /&gt;I don't think you need the second measure if I understand correctly.&lt;BR /&gt;&lt;BR /&gt;Try following:&lt;BR /&gt;&lt;BR /&gt;MyMeasure = &lt;BR /&gt;var Count_today = CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ), 'case'[date] = TODAY ())&lt;BR /&gt;&lt;BR /&gt;return&lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK(Count_today,0,Count_today)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 10:04:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633301#M77120</guid>
      <dc:creator>Migasuke</dc:creator>
      <dc:date>2022-07-12T10:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate today cases</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633480#M77132</link>
      <description>&lt;P&gt;The syntax for 'returnif' is incorrect&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Too many arguments were passed to the ISBLANK function. The maximum argument count for the function is 1.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:22:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633480#M77132</guid>
      <dc:creator>Michael92</dc:creator>
      <dc:date>2022-07-12T11:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate today cases</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633529#M77135</link>
      <description>&lt;P&gt;OK, now it works. Only a few parentheses needed to be added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MyMeasure =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var Count_today = CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ), 'case'[date] = TODAY ())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ISBLANK(Count_today&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;,0,&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;Count_today)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:40:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-today-cases/m-p/2633529#M77135</guid>
      <dc:creator>Michael92</dc:creator>
      <dc:date>2022-07-12T11:40:23Z</dc:date>
    </item>
  </channel>
</rss>

