<?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: Make a measure display 0 instead of blank in 'card' visualization in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737450#M36065</link>
    <description>&lt;P&gt;add +0 to the end of your measure&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))+0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also tie it into an IF statement, for example&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= 
VAR _RevenueYearToDate = CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))

Return 

IF(_RevenueYearToDate= "null" , 0 ,_RevenueYearToDate)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To answer your question, it's resulting in "null" or "blank" because that is the answer. If it has nothing to calculate (because the values are blank) the answer is Blank. If it were calculating 1-1 then the answer would be 0 but "blank" - "blank" = "blank" i.e. no values can be found, therefore the result is blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Remember in binary "0" is a value in its own right. So if your "&lt;EM&gt;Revenue" &lt;/EM&gt;column is "null" and not "0" it's treated as a null value, which is different to 0.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2021 17:43:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-03-22T17:43:48Z</dc:date>
    <item>
      <title>Make a measure display 0 instead of blank in 'card' visualization</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737434#M36064</link>
      <description>&lt;P&gt;I have my measure &lt;STRONG&gt;Revenue YearToDate&lt;/STRONG&gt; as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For dates with no revenue... If I choose a 'card' visualization I get the value &lt;STRONG&gt;(blank)&lt;/STRONG&gt; instead of &lt;STRONG&gt;0&lt;/STRONG&gt;, why is that? how can I change it to display 0 instead of 'blank'?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 17:19:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737434#M36064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-22T17:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Make a measure display 0 instead of blank in 'card' visualization</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737450#M36065</link>
      <description>&lt;P&gt;add +0 to the end of your measure&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))+0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also tie it into an IF statement, for example&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= 
VAR _RevenueYearToDate = CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))

Return 

IF(_RevenueYearToDate= "null" , 0 ,_RevenueYearToDate)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To answer your question, it's resulting in "null" or "blank" because that is the answer. If it has nothing to calculate (because the values are blank) the answer is Blank. If it were calculating 1-1 then the answer would be 0 but "blank" - "blank" = "blank" i.e. no values can be found, therefore the result is blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Remember in binary "0" is a value in its own right. So if your "&lt;EM&gt;Revenue" &lt;/EM&gt;column is "null" and not "0" it's treated as a null value, which is different to 0.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 17:43:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737450#M36065</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-22T17:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Make a measure display 0 instead of blank in 'card' visualization</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737481#M36067</link>
      <description>&lt;P&gt;Thanks, I was wondering... this link&amp;nbsp;&lt;A href="https://towardsdatascience.com/power-bi-what-is-dax-and-why-you-should-or-should-not-learn-it-1581aadbb038" target="_blank"&gt;Power BI: What is DAX? And Why you Should (or Should Not) Learn It | by ZhongTr0n | Towards Data Science&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Says: "&lt;SPAN&gt;When displaying numerical data in a card, for example ‘revenue’, it will return ‘blank’ if you set your filters in a way there is no revenue to show. However, a more natural way to display ‘no revenue’ should be ‘0’ instead of ‘blank’. &lt;STRONG&gt;With a very simple DAX expression, you can yourself create a measure adding a ‘0’ to the formula, meaning you will never have to see ‘blank’ again.&lt;/STRONG&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why the link says its very simple? it doesnt look like that...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 17:50:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1737481#M36067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-22T17:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Make a measure display 0 instead of blank in 'card' visualization</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1739380#M36118</link>
      <description>&lt;P&gt;I guess it's subjective, what one person considers simple might not be the same for another. Only the author could really answer your question.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 11:33:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-a-measure-display-0-instead-of-blank-in-card-visualization/m-p/1739380#M36118</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-23T11:33:07Z</dc:date>
    </item>
  </channel>
</rss>

