<?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: Help Replacing Blank Values with 0 in DAX! in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247692#M168174</link>
    <description>&lt;P&gt;Any other alternative to&amp;nbsp;&lt;SPAN&gt;COALESCE(), ISEMPTY, NOT(ISBLANK), and adding +0? These didnt work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2024 06:15:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-10-18T06:15:30Z</dc:date>
    <item>
      <title>Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4246961#M168141</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am calculating the retention rate of our customers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the Power BI matrix visual, the columns represent the Day Count, and the rows show the Registration date. To illustrate, I am analyzing the cohort that registered on September 21st. On day 0, 38 people from that cohort visited our shop. On day 1, 10 people visited, and on day 2, 2 people visited. However, from day 3 to day 15, no one from that cohort visited, so the cells display blank values.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In DAX, I want to replace these blank values with 0. I have tried using COALESCE(), ISEMPTY, NOT(ISBLANK), and adding +0, but none of these approaches are working. How can I modify the following measure to return 0 instead of blank?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Number of Customer Visits = &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;( COUNT(TableA[CustomerID]) )&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you very much!&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 16:55:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4246961#M168141</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-17T16:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247158#M168148</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Number of Customer Visits =&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;COALESCE(CALCULATE&lt;/SPAN&gt;( COUNT(TableA[CustomerID]) ),0)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:34:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247158#M168148</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-17T19:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247166#M168149</link>
      <description>&lt;P&gt;Just a wild guess.try something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Customer Vists = CALCULATE(SWITCH(TRUE(),NOT ISBLANK(COUNT(TableA[CustomerID])),COUNT(TableA[CustomerID]),0))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:38:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247166#M168149</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-17T19:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247690#M168173</link>
      <description>&lt;P&gt;:'( thank you for your help but it doesn't work&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 06:14:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247690#M168173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-18T06:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247692#M168174</link>
      <description>&lt;P&gt;Any other alternative to&amp;nbsp;&lt;SPAN&gt;COALESCE(), ISEMPTY, NOT(ISBLANK), and adding +0? These didnt work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 06:15:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247692#M168174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-18T06:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247909#M168181</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use IF condition to return desired value , something like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NO_OF_CUST = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; _CUst = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(T_Registration[Cust_ID]))&amp;nbsp; // Replace with your measure, this is on dummy data&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(_CUst)=&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,_CUst)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;You can replace your actual measure in if condition and should work&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&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;&lt;STRONG&gt;If this helps, please mark this as a solution. You can say special thank you by giving Kudos &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 08:18:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4247909#M168181</guid>
      <dc:creator>divyed</dc:creator>
      <dc:date>2024-10-18T08:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4249557#M168254</link>
      <description>&lt;P&gt;Thank you for dedication. Unfortunately it couldn't work on my report&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2024 11:21:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4249557#M168254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-20T11:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4249564#M168255</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strange, have you checked if correct relationship is setup ?&lt;/P&gt;&lt;P&gt;Ok, lets try couple of more things :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Use&amp;nbsp;COUNTROWS with Values :&amp;nbsp;This approach will return 0 where no customers exist&amp;nbsp;&lt;/P&gt;&lt;P&gt;Number of Customers visited =&lt;BR /&gt;IF(&lt;BR /&gt;COUNTROWS(VALUES(TableA[CustomerID])) = 0,&lt;BR /&gt;0,&lt;BR /&gt;COUNT(TableA[CustomerID])&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Number of Customers&amp;nbsp; visited=&lt;BR /&gt;SUMX(&lt;BR /&gt;VALUES(Day_Count), // replace with actual field name&lt;BR /&gt;IF(COUNT(TableA[CustomerID]) = BLANK(), 0, COUNT(TableA[CustomerID]))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let us know if this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2024 11:41:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4249564#M168255</guid>
      <dc:creator>divyed</dc:creator>
      <dc:date>2024-10-20T11:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help Replacing Blank Values with 0 in DAX!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4250242#M168278</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;You can try formula like below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Number of Customer Visits = 
IF (
    ISBLANK ( MAX(TableA[Customer Visits])),
    0,
    CALCULATE ( SUM( ( TableA[Customer Visits] ) )
))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 07:24:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-Replacing-Blank-Values-with-0-in-DAX/m-p/4250242#M168278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-21T07:24:57Z</dc:date>
    </item>
  </channel>
</rss>

