<?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: Create list of values in order to parse it into a filter with IN in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014333#M102316</link>
    <description>&lt;P&gt;You can get the values by using the VALUES function, so to get all the letters from letter group 2 you could use&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR LettersFromGroup2 = CALCULATETABLE( VALUES( 'Table'[Letter]), 'Table'[Letter Group] = 2 )&lt;/LI-CODE&gt;
&lt;P&gt;but you don't need to do that. You can use the letter group column itself as a filter, so you could write your measure as&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Letter group 2 sum =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Letter Group] = 2 )
&lt;/LI-CODE&gt;
&lt;P&gt;If the column you are filtering on is in the same table as the values you wish to sum then you may need to use REMOVEFILTERS if other columns from the same table are in the visual.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2023 15:48:32 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-01-11T15:48:32Z</dc:date>
    <item>
      <title>Create list of values in order to parse it into a filter with IN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014254#M102306</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a table that has the following structure:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Letter&lt;/TD&gt;&lt;TD&gt;Letter Group&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;H&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;I&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;I would like to get a list of letters by chosing a letter group. This list would then be needed in a FILTER segment of a CALCULATE function.&amp;nbsp;&lt;BR /&gt;An example would be as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE(
    sum('Table'[Values]),
    FILTER(
        'Table',
        'Table'[Letter] in {listofletters}
    )
)

where listofletters is a list of all letters from letter group 2 (so D, E, F)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you can see, I am attempting to sum up all values of table 'Table' that are associated with the list of letters from Letter Group 2. My questions are the following:&lt;BR /&gt;&lt;BR /&gt;1) Is my application of the FILTER function correct i.e. is it possible to parse in a list of values in the FILTER function so CALCULATE is only summing up values associated with the list of letters?&lt;/P&gt;&lt;P&gt;2) What is the proper DAX command in order to obtain such a list of letters?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 15:30:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014254#M102306</guid>
      <dc:creator>ThomasSan</dc:creator>
      <dc:date>2023-01-11T15:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create list of values in order to parse it into a filter with IN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014311#M102312</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="329838" data-lia-user-login="ThomasSan" class="lia-mention lia-mention-user"&gt;ThomasSan&lt;/a&gt; , Something like this &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CALCULATE(&lt;BR /&gt;sum('Table'[Values]),&lt;BR /&gt;FILTER(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Letter] in summarize(filter(Table, Table[Letter Group]=2), Table[Letter])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 15:43:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014311#M102312</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-11T15:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create list of values in order to parse it into a filter with IN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014333#M102316</link>
      <description>&lt;P&gt;You can get the values by using the VALUES function, so to get all the letters from letter group 2 you could use&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR LettersFromGroup2 = CALCULATETABLE( VALUES( 'Table'[Letter]), 'Table'[Letter Group] = 2 )&lt;/LI-CODE&gt;
&lt;P&gt;but you don't need to do that. You can use the letter group column itself as a filter, so you could write your measure as&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Letter group 2 sum =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Letter Group] = 2 )
&lt;/LI-CODE&gt;
&lt;P&gt;If the column you are filtering on is in the same table as the values you wish to sum then you may need to use REMOVEFILTERS if other columns from the same table are in the visual.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 15:48:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3014333#M102316</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-01-11T15:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create list of values in order to parse it into a filter with IN</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3016040#M102427</link>
      <description>&lt;P&gt;That was exactly what I was looking for. Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 08:06:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-list-of-values-in-order-to-parse-it-into-a-filter-with-IN/m-p/3016040#M102427</guid>
      <dc:creator>ThomasSan</dc:creator>
      <dc:date>2023-01-12T08:06:30Z</dc:date>
    </item>
  </channel>
</rss>

