<?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: Multi Valued Parameter in Report Builder with a a DAX Query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4121591#M163654</link>
    <description>&lt;P&gt;No problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;On RSCustomDaxFilter, apparently an update in August 2020 addressed some issues with query length due to large numbers of parameters, but I don't know specifically what was changed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fundamental issue is that the the Paginated Report list of parameter values needs to be translated into a single-column table within the DAX query.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In Chris Webb's article you referred to, this single-column table is created within the DAX query using PATH functions and GENERATE (after having created a pipe-delimited list with the SSRS Join function).&lt;/LI&gt;
&lt;LI&gt;With RSCustomDaxFilter, the DAX is auto-generated and appears as a table of literal values, such as&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class=""&gt;&lt;CODE&gt;{ "B", "C", "D" }​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm assuming the RSCustomDaxFilter method is the preferred method given the August 2020 update, and the fact that PATH functions would run into trouble if any text values containing the "|" character.&lt;/P&gt;
&lt;P&gt;However, it would be interesting to test with very long lists of parameter values.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2024 23:47:09 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2024-08-27T23:47:09Z</dc:date>
    <item>
      <title>Multi Valued Parameter in Report Builder with a a DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4117019#M163445</link>
      <description>&lt;P&gt;I am creating a paginated report from a report from a Power BI model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to pass multiple valued parameter to the DAX query.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see that a lot of blogs say it is not possible. I want to understand why exactly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets I have a parameter &lt;STRONG&gt;"@paramet"&lt;/STRONG&gt;&amp;nbsp; and it can take multiple values "A" and "B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If power builder is returning "A, B" to the DAX query, is there a way to convert it into a table (ParametTable) with single column of values {"A", "B"} so that it can be used as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VAR FilterMultipleValues =&amp;nbsp;'SampleTable'[SampleColumn] IN (ParametTable)&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I hard code the parameter values as shown below in DAX Query View of Power BI Desktop it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR FilterMultipleValues = &amp;nbsp;FILTER(KEEPFILTERS(VALUES('SampleTable'[SampleColumn])),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;'SampleTable'[SampleColumn] IN ( {"A", "B"} ) )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 25 Aug 2024 00:10:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4117019#M163445</guid>
      <dc:creator>Hoping</dc:creator>
      <dc:date>2024-08-25T00:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multi Valued Parameter in Report Builder with a a DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4117257#M163456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="580655" data-lia-user-login="Hoping" class="lia-mention lia-mention-user"&gt;Hoping&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is certainly possible to have multiple-valued parameters in Paginated Report passed to the DAX query for a Dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a while since I'd set one up, but I was able to do so just now following&amp;nbsp;&lt;A href="https://caf2code.com/paginated-reports/paginated-reports-101-part-4-adding-parameters-and-filters-to-your-paginated-report/#:~:text=Parameters%20and%20filters%20that%20are%20applied%20at%20the%20Query%20Level%3A" target="_blank" rel="noopener"&gt;this article&lt;/A&gt;&amp;nbsp;which covers some examples of query-level parameters (among other things). See the section near to the top titled &lt;STRONG&gt;Parameters and filters that are applied at the Query Level.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also &lt;A href="https://blog.crossjoin.co.uk/2019/11/03/power-bi-report-builder-and-rscustomdaxfilter/" target="_blank" rel="noopener"&gt;this post&lt;/A&gt; from Chris Webb.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached my test files in case they're of any help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example I set up, using Query Designer, I ended up with this query which uses the RSCustomerDaxFilter syntax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EVALUATE SUMMARIZECOLUMNS('SampleTable'[SampleColumn], RSCustomDaxFilter(@SampleTableSampleColumn,EqualToCondition,[SampleTable].[SampleColumn],String))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is translated into a proper DAX query when the report is run, e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EVALUATE
SUMMARIZECOLUMNS (
    'SampleTable'[SampleColumn],
    FILTER (
        VALUES ( 'SampleTable'[SampleColumn] ),
        ( 'SampleTable'[SampleColumn] IN { "B", "C", "D" } )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For testing, the Data Source "Local_PBIX" is an Analysis Services connection to a local PBIX, which you can adjust by changing the Connection String.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does that help at all?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 13:54:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4117257#M163456</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2024-08-25T13:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multi Valued Parameter in Report Builder with a a DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4121529#M163648</link>
      <description>&lt;P&gt;&amp;nbsp;Thank You&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;. I did not know about&amp;nbsp;&lt;SPAN&gt;RSCustomDaxFilter. Will read more about it. Length of DAX query does seem like something to be worried about. Meanwhile, I used the technique given in this &lt;A href="https://blog.crossjoin.co.uk/2018/05/16/a-new-approach-to-handling-ssrs-multi-valued-parameters-in-dax-queries/" target="_self"&gt;Chris Webb's Blog&lt;/A&gt;&amp;nbsp;which uses PATHCONTAINS DAX function on a concatenated string of parameters. This worked well for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But why all the work arounds?&amp;nbsp; Is it because DAX cannot handle string of dynamic lengths ?&amp;nbsp; I am keen to understand why.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 22:09:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4121529#M163648</guid>
      <dc:creator>Hoping</dc:creator>
      <dc:date>2024-08-27T22:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Multi Valued Parameter in Report Builder with a a DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4121591#M163654</link>
      <description>&lt;P&gt;No problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;On RSCustomDaxFilter, apparently an update in August 2020 addressed some issues with query length due to large numbers of parameters, but I don't know specifically what was changed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fundamental issue is that the the Paginated Report list of parameter values needs to be translated into a single-column table within the DAX query.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In Chris Webb's article you referred to, this single-column table is created within the DAX query using PATH functions and GENERATE (after having created a pipe-delimited list with the SSRS Join function).&lt;/LI&gt;
&lt;LI&gt;With RSCustomDaxFilter, the DAX is auto-generated and appears as a table of literal values, such as&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class=""&gt;&lt;CODE&gt;{ "B", "C", "D" }​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm assuming the RSCustomDaxFilter method is the preferred method given the August 2020 update, and the fact that PATH functions would run into trouble if any text values containing the "|" character.&lt;/P&gt;
&lt;P&gt;However, it would be interesting to test with very long lists of parameter values.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 23:47:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multi-Valued-Parameter-in-Report-Builder-with-a-a-DAX-Query/m-p/4121591#M163654</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2024-08-27T23:47:09Z</dc:date>
    </item>
  </channel>
</rss>

