<?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: OR condition between multivalue parameters in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1853061#M19386</link>
    <description>&lt;P&gt;Hi Murali,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Try like below. You may need to handle "ALL" (blank) is no value is passed.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZECOLUMNS (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Data'[CNTR], 'Data'[CNTR_DT], 'Data'[SUPP_LD_NO], &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Data,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(FORMAT ( Data[CNTR_DT], "YYYY-MM-DD" )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;= FORMAT ("2020-01-01", "YYYY-MM-DD" )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;|| (PATHCONTAINS ( "A", DATA[CNTR] )))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;|| PATHCONTAINS ("1ABC", DATA[SUPP_LD_NO])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hari&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 20 May 2021 06:33:55 GMT</pubDate>
    <dc:creator>Hariharan_R</dc:creator>
    <dc:date>2021-05-20T06:33:55Z</dc:date>
    <item>
      <title>OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1275481#M15443</link>
      <description>&lt;P&gt;I am replicating&amp;nbsp;&amp;nbsp; a power bi report on paginated Report Builder that has multiple slicers (or parameters), namely Sales Region, SalesType, State, Model_Name, Serial_Number, etc. When we run the report values to the parameters needs to be passed to view the report. For better understanding , it is like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Sales Region] &lt;STRONG&gt;AND&lt;/STRONG&gt; [SR_Type] &lt;STRONG&gt;AND&lt;/STRONG&gt; [State] &lt;STRONG&gt;AND&lt;/STRONG&gt; [Model_Name] &lt;STRONG&gt;AND&lt;/STRONG&gt; [Serial_Number]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whereas the requirement is that the end user should be able to pass value of ANY of the parameters (not all ) to be able to view the report. So, the requirement is like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Sales Region] &lt;STRONG&gt;OR&lt;/STRONG&gt; [SR_Type] &lt;STRONG&gt;OR&lt;/STRONG&gt; [State] &lt;STRONG&gt;OR&lt;/STRONG&gt; [Model_Name] &lt;STRONG&gt;OR&lt;/STRONG&gt; [Serial_Number]&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;&lt;P&gt;In SSRS, the same can be done by writing a simple SQL query like:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select [Sales Region], [SR_Type], [State], [Model_Name], [Serial_Number]&lt;/P&gt;&lt;P&gt;From &amp;lt;table&amp;gt;&lt;/P&gt;&lt;P&gt;Where [Sales Region] In @pSalesRegion OR&amp;nbsp; &amp;nbsp;[SR_Type] In @pSRType OR [Model_Name] In @pModelName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the @pSalesRegion, @pSRType And &amp;nbsp;@pModelName represent the multiple value parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the DAX equivalent of the Sql Query shown above? How can I achieve OR condition between various multivalue parameters? Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 18:10:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1275481#M15443</guid>
      <dc:creator>Shri</dc:creator>
      <dc:date>2020-08-05T18:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1276440#M15447</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="251029" data-lia-user-login="Shri" class="lia-mention lia-mention-user"&gt;Shri&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you can use the filters in the filter pane in Power BI Desktop. Or is this too easy ...&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/de-de/power-bi/consumer/end-user-report-filter" target="_blank"&gt;https://docs.microsoft.com/de-de/power-bi/consumer/end-user-report-filter&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Kathrin&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;If this post has helped you, please give it a thumbs up!&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Did I answer your question? Mark my post as a solution!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 06:17:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1276440#M15447</guid>
      <dc:creator>KBO</dc:creator>
      <dc:date>2020-08-06T06:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1276441#M15448</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="251029" data-lia-user-login="Shri" class="lia-mention lia-mention-user"&gt;Shri&lt;/a&gt; , a filter like this &lt;/P&gt;
&lt;P&gt;filter(all(Table),&lt;BR /&gt;Table[Sales Region] in values(Table[Sales Region]) || Table[SR_Type] in values(Table[SR_Type]) &lt;BR /&gt;|| Table[State] in values(Table[State) || Table[Model_Name] in values(Table[Model_Name]) &lt;BR /&gt;|| Table[Serial_Number] in values(Table[Serial_Number]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But better have slicer from disconnected table to avoid all&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 06:17:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1276441#M15448</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-06T06:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1277647#M15452</link>
      <description>&lt;P&gt;Using OR operator is trick in Report Builder. I have&amp;nbsp;recorded as short video showing how to&amp;nbsp;achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://barbarossaglamtimur.blob.core.windows.net/den/MultivalueOROperatorDAX.mp4" target="_blank" rel="noopener"&gt;Video link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, trick part is&amp;nbsp;modifying DAX query and use parameter properly in this query. For your&amp;nbsp;reference here is the query, and let me explain how does Report Builder/PowerBI RS&amp;nbsp;handles parameters with OR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
    [measure],
    UNION (
        CROSSJOIN ( VALUES ( T1[Column1] ), ALL ( T2[Column2] ) ),
        CROSSJOIN ( ALL ( T1[Column1] ), VALUES ( T2[Column2] ) )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how to implement multi-column filter. There are&amp;nbsp;other methods, but this one is suitable for injecting parameters (For other techniques please refer to &lt;A href="https://www.sqlbi.com/articles/using-or-conditions-between-slicers-in-dax/" target="_blank" rel="noopener"&gt;this excellent article&lt;/A&gt;. We are using #1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power BI Report Builder Query Editor generates this query (for sure its "AND")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EVALUATE SUMMARIZECOLUMNS(
RSCustomDaxFilter(@DimProductColor,EqualToCondition,[DimProduct].[Color],String), 
RSCustomDaxFilter(@DimProductSize,EqualToCondition,[DimProduct].[Size],String), 
"TotalSalesAmount", [TotalSalesAmount])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, when executing, engine re-writes it and uses selected parameters and injects them as "FILTER" (still uses AND)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EVALUATE SUMMARIZECOLUMNS(
FILTER (
        VALUES ( 'DimProduct'[Color] ),
        ( 'DimProduct'[Color] = "Black" )
            || ( 'DimProduct'[Color] = "Blue" )
            || ( 'DimProduct'[Color] = "Grey" )
    ) ,
    FILTER (
        VALUES ( 'DimProduct'[Size] ),
        ( 'DimProduct'[Size] = "L" )
            || ( 'DimProduct'[Size] = "M" )
            || ( 'DimProduct'[Size] = "S" )
            || ( 'DimProduct'[Size] = "XL" )
    ),
"TotalSalesAmount", [TotalSalesAmount])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So every RSCustomDaxFilter function is translated to corresponding "FILTER". If we change our query to apply this method (to use&amp;nbsp; OR), we get the result we want. Finally here is the query which is modified in the Power BI Report Builder Query Editor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EVALUATE SUMMARIZECOLUMNS(UNION (
            CROSSJOIN (
                RSCustomDaxFilter(@DimProductColor,EqualToCondition,[DimProduct].[Color],String),
                ALL ( 'DimProduct'[Size] )
            ),
            CROSSJOIN (
                ALL ( 'DimProduct'[Color] ),
                RSCustomDaxFilter(@DimProductSize,EqualToCondition,[DimProduct].[Size],String)
            )
        ), "TotalSalesAmount", [TotalSalesAmount])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;If my post solved your problem, mark my post as a solution to help others to quickly find it and also please give it a &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 06:44:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1277647#M15452</guid>
      <dc:creator>saglamtimur</dc:creator>
      <dc:date>2020-08-07T06:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1841102#M19303</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found your solution to be useful, but I am not clear how I can modify it to suit my requirement. My current report builder query is as below:&lt;/P&gt;&lt;P&gt;EVALUATE SUMMARIZECOLUMNS('DataforPL'[CNTR], 'DataforPL'[CNTR_DT], 'DataforPL'[SUPP_LD_NO], RSCustomDaxFilter(@DataforPLCNTR,EqualToCondition,[DataforPL].[CNTR],String), RSCustomDaxFilter(@DataforPLCNTRDT,EqualToCondition,[DataforPL].[CNTR_DT],DateTime), RSCustomDaxFilter(@DataforPLSUPPLDNO,EqualToCondition,[DataforPL].[SUPP_LD_NO],String))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 parameters in above query above. I need to modify it such either I&amp;nbsp;enter a combination of&amp;nbsp;[CNTR] &amp;amp;&amp;nbsp;[CNTR_DT] or enter just enter&amp;nbsp;[SUPP_LD_NO] as the parameter, leaving other two fields blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope I was clear with my requirement. Thanks to assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Muralidhar&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 16:11:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1841102#M19303</guid>
      <dc:creator>murali5431</dc:creator>
      <dc:date>2021-05-13T16:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1853061#M19386</link>
      <description>&lt;P&gt;Hi Murali,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Try like below. You may need to handle "ALL" (blank) is no value is passed.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZECOLUMNS (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Data'[CNTR], 'Data'[CNTR_DT], 'Data'[SUPP_LD_NO], &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Data,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(FORMAT ( Data[CNTR_DT], "YYYY-MM-DD" )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;= FORMAT ("2020-01-01", "YYYY-MM-DD" )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;|| (PATHCONTAINS ( "A", DATA[CNTR] )))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;|| PATHCONTAINS ("1ABC", DATA[SUPP_LD_NO])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hari&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 May 2021 06:33:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1853061#M19386</guid>
      <dc:creator>Hariharan_R</dc:creator>
      <dc:date>2021-05-20T06:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1854355#M19394</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="118918" data-lia-user-login="Hariharan_R" class="lia-mention lia-mention-user"&gt;Hariharan_R&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 13:35:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1854355#M19394</guid>
      <dc:creator>murali5431</dc:creator>
      <dc:date>2021-05-20T13:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: OR condition between multivalue parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1854844#M19399</link>
      <description>&lt;P&gt;&lt;STRONG&gt;If my answer helps you,&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;Mark my post as a solution!!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 17:12:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/OR-condition-between-multivalue-parameters/m-p/1854844#M19399</guid>
      <dc:creator>Hariharan_R</dc:creator>
      <dc:date>2021-05-20T17:12:00Z</dc:date>
    </item>
  </channel>
</rss>

