<?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: Filter Context Issue when trying to Show Records with No Data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/934530#M9686</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="182322" data-lia-user-login="Chthonian" class="lia-mention lia-mention-user"&gt;Chthonian&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;COUNTROWS() can &lt;STRONG&gt;not&lt;/STRONG&gt; return you blank. If no rows founded it will return you 0, as described here&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/countrows-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/countrows-function-dax&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;so, you should compare it with 0 in if, like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Opportunities QTY = IF(
   COUNTROWS(Opportunities) = 0,
   0, 
   COUNTROWS(Opportunities)
)&lt;/LI-CODE&gt;
&lt;P&gt;but it has no sense, I think &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;so,for conditional formatting it could be less strictly condition&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Feb 2020 17:17:52 GMT</pubDate>
    <dc:creator>az38</dc:creator>
    <dc:date>2020-02-16T17:17:52Z</dc:date>
    <item>
      <title>Filter Context Issue when trying to Show Records with No Data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/933955#M9665</link>
      <description>&lt;P&gt;Hello my PowerBi friends,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have (hopefully) a simple filtering issue when I am trying to show records with no data in a Table visual and hoping somebody in the datasphere can help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scenario/Requirement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Show a list of Account Managers, their customers, and a count of sales opportunities. This table also needs to show if there are &lt;U&gt;no&lt;/U&gt; opportunities against the customer account.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example Required Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Account Manager&lt;/TD&gt;&lt;TD&gt;Customer Name&lt;/TD&gt;&lt;TD&gt;Opportunities&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AM1&lt;/TD&gt;&lt;TD&gt;Customer1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AM1&lt;/TD&gt;&lt;TD&gt;Customer2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AM2&lt;/TD&gt;&lt;TD&gt;Customer3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data Model Layout:&lt;/STRONG&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAX Measure:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Total Opportunities QTY = IF(&lt;BR /&gt;   ISBLANK(COUNTROWS(Opportunities)),&lt;BR /&gt;   0, &lt;BR /&gt;   COUNTROWS(Opportunities)&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using the above measure strips any filtering from Customer Accounts and shows all Customer Accounts against all Account Managers. The moment I remove the ISBLANK and IF it filters exactly as you would expect. Now I know I can simply use 'Show Items with No Data' from the field options, but I would like to use conditional formatting and was going to use "IF COUNT(Opportinities) = 0, SHOW RED ICON" as an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am probably missing something simple in my tired state, but you never know if you dont ask&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2020 06:54:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/933955#M9665</guid>
      <dc:creator>Chthonian</dc:creator>
      <dc:date>2020-02-15T06:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context Issue when trying to Show Records with No Data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/933958#M9666</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":persevering_face:"&gt;😣&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":sleeping_face:"&gt;😴&lt;/span&gt;&amp;nbsp;- So, I am indeed being a numpty!! Conditional formatting caters for 'is Blank' I am a silly muppet, so sorry folks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While I have solved my issue in this instance, I would be interested to know why filters are stripped using the ISBLANK() dax in a measure, so if anybody is in a teaching enlightening mood, my brain is always eager to understand these things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SOLUTION:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2020 07:00:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/933958#M9666</guid>
      <dc:creator>Chthonian</dc:creator>
      <dc:date>2020-02-15T07:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context Issue when trying to Show Records with No Data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/934530#M9686</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="182322" data-lia-user-login="Chthonian" class="lia-mention lia-mention-user"&gt;Chthonian&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;COUNTROWS() can &lt;STRONG&gt;not&lt;/STRONG&gt; return you blank. If no rows founded it will return you 0, as described here&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/countrows-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/countrows-function-dax&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;so, you should compare it with 0 in if, like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Opportunities QTY = IF(
   COUNTROWS(Opportunities) = 0,
   0, 
   COUNTROWS(Opportunities)
)&lt;/LI-CODE&gt;
&lt;P&gt;but it has no sense, I think &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;so,for conditional formatting it could be less strictly condition&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 17:17:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/934530#M9686</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-02-16T17:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context Issue when trying to Show Records with No Data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/3958600#M153623</link>
      <description>&lt;P&gt;From the page you linked:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;When the table argument contains no rows, the function returns BLANK.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 29 May 2024 16:38:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/3958600#M153623</guid>
      <dc:creator>lokar78</dc:creator>
      <dc:date>2024-05-29T16:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Context Issue when trying to Show Records with No Data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/3958609#M153624</link>
      <description>&lt;P&gt;To convert a BLANK() to a 0, just add a 0 to your expression.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Opportunities QTY = COUNTROWS(Opportunities)+0&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 16:39:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Context-Issue-when-trying-to-Show-Records-with-No-Data/m-p/3958609#M153624</guid>
      <dc:creator>lokar78</dc:creator>
      <dc:date>2024-05-29T16:39:41Z</dc:date>
    </item>
  </channel>
</rss>

