<?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: Power BI Remove rows based on multiple conditions for dashboard in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/4111834#M163181</link>
    <description>&lt;P&gt;This helped me get started, but the sample code was based on there being only one instance of "not allowed". Here is something that should be more flexible:&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;mark = 
VAR test =
    CALCULATE (
        COUNT ( 'Table'[sale status] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Country] = MAX ( 'Table'[Country] ) )
    )
RETURN
    IF (
        test &amp;gt;= 2
        &amp;amp;&amp;amp; MAX ( 'Table'[sale status] ) = "not allowed",
        0,
        1
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you don't necessarily need the separate table. Just filter your visual/page/dashboard by the measure field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2024 17:55:26 GMT</pubDate>
    <dc:creator>Kate1053</dc:creator>
    <dc:date>2024-08-21T17:55:26Z</dc:date>
    <item>
      <title>Power BI Remove rows based on multiple conditions for dashboard</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/2240651#M53629</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggeling with the following issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table which looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;sale status&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;US&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;allowed&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;GER&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;not allowed&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;AUT&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;allowed&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;GER&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;allowed&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to loop through the country column and identify duplicates and at the same time the command should check in case of duplicated values for a second condition which is "not allowed" in the column sales status. If the both conditions are matched the "not allowed" row should be removed completely from the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you guys can help me out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 16:26:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/2240651#M53629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-15T16:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Remove rows based on multiple conditions for dashboard</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/2240759#M53638</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; can you please provide better dta; this dat does not seem to be reprentative of the issue you rae describing&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 17:38:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/2240759#M53638</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-15T17:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Remove rows based on multiple conditions for dashboard</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/2247152#M53973</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Try steps like&amp;nbsp; below:&lt;/P&gt;
&lt;P&gt;base on table ,create a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mark = 
VAR test1 =
    CALCULATE (
        COUNT ( 'Table'[sale status] ),
        FILTER ( ALL ( 'Table' ), 'Table'[sale status] = "not allowed" )
    )
VAR test2 =
    CALCULATE (
        COUNT ( 'Table'[sale status] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Country] = MAX ( 'Table'[Country] ) )
    )
RETURN
    IF (
        test1 &amp;gt;= 1
            &amp;amp;&amp;amp; test2 &amp;gt; test1
            &amp;amp;&amp;amp; MAX ( 'Table'[sale status] ) = "not allowed",
        0,
        1
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 2, custom&amp;nbsp; create new table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = CALCULATETABLE('Table',FILTER('Table','Table'[mark]=1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Output result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Did I answer your question? Mark my post as a solution!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Lucien&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:53:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/2247152#M53973</guid>
      <dc:creator>v-luwang-msft</dc:creator>
      <dc:date>2021-12-20T08:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Remove rows based on multiple conditions for dashboard</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/4111834#M163181</link>
      <description>&lt;P&gt;This helped me get started, but the sample code was based on there being only one instance of "not allowed". Here is something that should be more flexible:&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;mark = 
VAR test =
    CALCULATE (
        COUNT ( 'Table'[sale status] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Country] = MAX ( 'Table'[Country] ) )
    )
RETURN
    IF (
        test &amp;gt;= 2
        &amp;amp;&amp;amp; MAX ( 'Table'[sale status] ) = "not allowed",
        0,
        1
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you don't necessarily need the separate table. Just filter your visual/page/dashboard by the measure field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 17:55:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Remove-rows-based-on-multiple-conditions-for-dashboard/m-p/4111834#M163181</guid>
      <dc:creator>Kate1053</dc:creator>
      <dc:date>2024-08-21T17:55:26Z</dc:date>
    </item>
  </channel>
</rss>

