<?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 function with a List as filter condition in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624645#M76607</link>
    <description>&lt;P&gt;Thank you so much for your help. Keeping it simple, it would be a dimProduct table that is filtered many different ways in i.a. a table visual with filter visuals next to it, so my initial thought would be replacing the List string with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR ItemList = CONCATENATEX(dimProduct, dimProduct[ItemNumber], ",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as you say, I don't get the right thing out of this. CONCATENATEX isn't the right function. How do I get there, though?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 09:54:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-07T09:54:34Z</dc:date>
    <item>
      <title>FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624586#M76599</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a customer who does a lot of different filterings, i.e. for Article groups and subgroups, location groups and subgroups, including changing overlap and changing groups. To have one measure to sum them up, I thought I would work with a variable list in the filters, like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;msrQuantity =

VAR
    ItemList = "12345, 54321"

RETURN
    CALCULATE(
        SUM(InventoryData[QTY]),
        FILTER(
        InventoryData,
        InventoryData[ItemNumber] IN {ItemList}
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ultimately, the ItemList would be a CONCATENATEX-Function, and there will be additional conditions added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function only returns data if the list is a single value (i.e. were it only "12345", I get the right item. I also tried putting them further into brackets like "{12345}, {54321}", but that doesn't change the table, either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible, or are there better ways to achieve this?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:36:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624586#M76599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-07T09:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624597#M76601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;lease use&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;msrQuantity =
VAR ItemList = { "12345", "54321" }
RETURN
    CALCULATE (
        SUM ( InventoryData[QTY] ),
        FILTER ( InventoryData, InventoryData[ItemNumber] IN ItemList )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:40:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624597#M76601</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-07T09:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624601#M76602</link>
      <description>&lt;P&gt;Just a second after I post this question I see I formatted the list wrong, each value needs to be in quotation marks, and not the whole string, like {"12345", "54321"}. The filter condition works that way, too. But then the question is how can I build such a list string i.e. using CONCATENATEX?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624601#M76602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-07T09:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624604#M76603</link>
      <description>&lt;P&gt;Thank you! I'm feeling really stupid right now, I saw that a minute after I made this post. Do you have any idea how I would automatically generate such a ItemList-String variably, though? I.e. using a CONCATENATEX?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:42:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624604#M76603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-07T09:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624624#M76605</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Generate it out of what? What is the input? Also CNCATENATEX won't help you, you need a table not a scallar concatenated string value&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:47:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624624#M76605</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-07T09:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624645#M76607</link>
      <description>&lt;P&gt;Thank you so much for your help. Keeping it simple, it would be a dimProduct table that is filtered many different ways in i.a. a table visual with filter visuals next to it, so my initial thought would be replacing the List string with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR ItemList = CONCATENATEX(dimProduct, dimProduct[ItemNumber], ",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as you say, I don't get the right thing out of this. CONCATENATEX isn't the right function. How do I get there, though?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:54:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624645#M76607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-07T09:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER function with a List as filter condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624653#M76608</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Simply&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR ItemList = VALUES(dimProduct[ItemNumber)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 09:57:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-function-with-a-List-as-filter-condition/m-p/2624653#M76608</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-07T09:57:29Z</dc:date>
    </item>
  </channel>
</rss>

