<?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: In a matrix visual need to show 0 instead of blank from a measure and preserve filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546452#M136366</link>
    <description>&lt;P&gt;The above ignores the category id filter which I need to preserve&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2023 09:32:00 GMT</pubDate>
    <dc:creator>akhaliq7</dc:creator>
    <dc:date>2023-11-22T09:32:00Z</dc:date>
    <item>
      <title>In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546405#M136362</link>
      <description>&lt;P&gt;I would like to display the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Registered Products =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SUM('Fact Orders'[Registered YN]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 'Fact Orders'[Category ID] IN {10, 11, 12},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 'Date'[Year] = YEAR(TODAY())&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;inside a matrix visual, but for some categories it is displaying blank values this is because I am showing more than 1 measure in values of the matrix visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I tried&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using if statement, adding 0 to sum but when I do this more than 1 category shows&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:02:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546405#M136362</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-11-22T09:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546432#M136364</link>
      <description>&lt;P&gt;try this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Registered Products =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if(SUM('Fact Orders'[Registered YN]&amp;gt;0,SUM('Fact Orders'[Registered YN]),0),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 'Fact Orders'[Category ID] IN {10, 11, 12},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 'Date'[Year] = YEAR(TODAY())&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:21:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546432#M136364</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2023-11-22T09:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546452#M136366</link>
      <description>&lt;P&gt;The above ignores the category id filter which I need to preserve&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:32:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546452#M136366</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-11-22T09:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546506#M136368</link>
      <description>&lt;P&gt;then try to put If statement before calculate. else share sample data.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:54:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546506#M136368</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2023-11-22T09:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546525#M136370</link>
      <description>&lt;P&gt;I tried putting the if statement before calculate but that didn't work i'll share a sample file after this reply&lt;/P&gt;&lt;P&gt;VAR Result = Calculate code&lt;BR /&gt;RETURN IF( ISBLANK(Result), 0, Result)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this ignored the filter applied in calculate&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 10:04:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546525#M136370</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-11-22T10:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546618#M136377</link>
      <description>&lt;P&gt;I have tried to create a sample dataset but keep getting different errors when displaying the data, and cannot share the original file as well, I may leave the blanks as it is unless someone else can solve this issue,&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 10:54:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546618#M136377</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-11-22T10:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546742#M136393</link>
      <description>&lt;P&gt;If I am not mistaken this issue may relate to the evaluation context and it is possibly applying the filter first then giving 0 value to all the other categories and adding them in the matrix visual, but not sure how to fix this&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 12:08:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3546742#M136393</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-11-22T12:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3549990#M136559</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I have created a simple sample, please refer to.&lt;/P&gt;
&lt;P&gt;Create a table includes Year&amp;nbsp;Fields.&amp;nbsp;&lt;/P&gt;
&lt;PRE class=""&gt;&lt;CODE&gt;Table 2 = VALUES('Table'[Year])&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then create a measure.&lt;/P&gt;
&lt;PRE class=""&gt;&lt;CODE&gt;Measure =
VAR _a =
    CALCULATE (
        MAX ( 'Table'[Sales] ),
        FILTER (
            'Table',
            [Portfolio] = "A"
                &amp;amp;&amp;amp; [Year] = SELECTEDVALUE ( 'Table 2'[Year] )
        )
    )
VAR _b =
    CALCULATE (
        MAX ( 'Table'[Sales] ),
        FILTER (
            'Table',
            [Portfolio] = "B"
                &amp;amp;&amp;amp; [Year] = SELECTEDVALUE ( 'Table 2'[Year] )
        )
    )
VAR result =
    CALCULATE (
        MAX ( 'Table'[Sales] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Portfolio]
                IN VALUES ( 'Table'[Portfolio] )
                    &amp;amp;&amp;amp; 'Table'[Year] IN VALUES ( 'Table 2'[Year] )
        )
    )
VAR _answer_ =
    IF ( result &amp;lt;&amp;gt; BLANK (), result, 0 )
RETURN
    IF ( ISINSCOPE ( 'Table'[Portfolio] ), _answer_, _b - _a )&lt;/CODE&gt;&lt;/PRE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 03:05:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3549990#M136559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-24T03:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: In a matrix visual need to show 0 instead of blank from a measure and preserve filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3550570#M136576</link>
      <description>&lt;P&gt;I need to try this out but do not have the time right now but have accepted the solution thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 10:02:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-a-matrix-visual-need-to-show-0-instead-of-blank-from-a/m-p/3550570#M136576</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-11-24T10:02:08Z</dc:date>
    </item>
  </channel>
</rss>

