<?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 with two Values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780160#M86972</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;)&amp;nbsp; Parameters&lt;/SPAN&gt;&amp;nbsp;should be value , can't be a table. You can change this function to COUNTROWS.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;varD&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;calccost&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 20 Sep 2022 09:24:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-20T09:24:09Z</dc:date>
    <item>
      <title>Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2767709#M86017</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem in DAX and can not find a solution after days of searching. Perhaps someone can give me a hint?&amp;nbsp;&lt;BR /&gt;I have the current MEASURE Definition:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CostUSER = 
VAR currentuser = [SELECTUSER] -- comes from other measure 
VAR varD = 
        SUMMARIZE (
            FILTER(USERDepartment,USERDepartment[USERID]=currentuser),
            USERDepartment[Department] )
    )
VAR calcCost = sumx(FILTER(RegionCost,related(DepartmentRegion[Department]) IN varD),RegionCost[Cost])
RETURN IF(ISBLANK(varD),BLANK(),calcCost)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;How it possible to FILTER&amp;nbsp;&lt;SPAN&gt;related&lt;SPAN&gt;(&lt;SPAN&gt;DepartmentRegion&lt;SPAN&gt;[Department]&lt;SPAN&gt;) with two Values ?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;The user in&amp;nbsp;&lt;SPAN&gt;USERDepartment can be assigned two 2&amp;nbsp;&lt;SPAN&gt;Departments. If a choose with a slicer one department everything works but with two&amp;nbsp;Departments it says that one value instead of two was expected.&amp;nbsp;&lt;BR /&gt;I try different things like TREATES, but with no success.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;The Tables&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;One hint we be so great! Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&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>Wed, 14 Sep 2022 14:56:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2767709#M86017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-14T14:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2769597#M86161</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried changing the one-to-many&amp;nbsp;single&lt;SPAN&gt;-directional&lt;/SPAN&gt;&amp;nbsp;relationships&amp;nbsp; to bidirectional relationships?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Eason&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 08:19:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2769597#M86161</guid>
      <dc:creator>v-easonf-msft</dc:creator>
      <dc:date>2022-09-15T08:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2779828#M86955</link>
      <description>&lt;P&gt;I am not sure, how this can help me in this case. I want to use the measure and do not know how to modify it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 08:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2779828#M86955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-20T08:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780160#M86972</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;)&amp;nbsp; Parameters&lt;/SPAN&gt;&amp;nbsp;should be value , can't be a table. You can change this function to COUNTROWS.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;varD&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;calccost&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Sep 2022 09:24:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780160#M86972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-20T09:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780594#M86992</link>
      <description>&lt;P&gt;In this case how I can filter if I have not 1 value but 2 values in the column?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 12:03:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780594#M86992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-20T12:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780617#M86994</link>
      <description>&lt;UL&gt;&lt;LI&gt;Actually your DAX formular can filter multi values except isblank function is wrong. You can change it and test.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 20 Sep 2022 12:08:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2780617#M86994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-20T12:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2781200#M87017</link>
      <description>&lt;P&gt;But if i choose User 1 I will have two values in varD and get a error.&lt;BR /&gt;VAR calcCost = sumx(FILTER(RegionCost,related(DepartmentRegion[Department]) IN varD),RegionCost[Cost])&lt;BR /&gt;How i can FIlter if varD has two values ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 15:04:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2781200#M87017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-20T15:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2782254#M87080</link>
      <description>&lt;P&gt;It is so wired. But for me it works. VarD is a table with multi values,if you select Userid 1. Calccost DAX function is correct.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 00:48:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2782254#M87080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-21T00:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2782302#M87086</link>
      <description>&lt;P&gt;Simulate your data&lt;/P&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;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 01:22:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2782302#M87086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-21T01:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter with two Values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2782655#M87103</link>
      <description>&lt;P&gt;Thank you, Thank you!&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; calcCost = &lt;/SPAN&gt;&lt;SPAN&gt;sumx&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(RegionCost,&lt;/SPAN&gt;&lt;SPAN&gt;related&lt;/SPAN&gt;&lt;SPAN&gt;(DepartmentRegion[Department]) &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; varD),RegionCost[Cost])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURNIF(COUNTROWS(varD)=0,BLANK(),calcCost)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I do not realize, that ISBLANK is the error. Now it works with countrows! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Sep 2022 05:17:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-with-two-Values/m-p/2782655#M87103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-21T05:17:52Z</dc:date>
    </item>
  </channel>
</rss>

