<?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: How to create a proper Multi-(IN) Clause DAX Query in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-proper-Multi-IN-Clause-DAX-Query/m-p/3538866#M135984</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="646814" data-lia-user-login="PBI_DAX_Newbie" class="lia-mention lia-mention-user"&gt;PBI_DAX_Newbie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can apply a filter in the table 'Invoices' when create a role with the below formula:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;'Invoices'[City]
    IN CALCULATETABLE (
        VALUES ( 'Cities'[City] ),
        FILTER (
            ALL ( 'Cities' ),
            'Cities'[State]
                IN CALCULATETABLE (
                    VALUES ( 'States'[State] ),
                    FILTER (
                        ALL ( 'States' ),
                        'States'[Region]
                            IN CALCULATETABLE (
                                VALUES ( 'Regions'[Region] ),
                                FILTER (
                                    ALL ( 'UserfTORegionMapping' ),
                                    'UserfTORegionMapping'[EmailAddress] = USERPRINCIPALNAME ()
                                )
                            )
                    )
                )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;In addition, you can refer the following links to get it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://radacad.com/dynamic-row-level-security-in-power-bi-with-not-in-or-not-equal-rule" target="_blank"&gt;Dynamic Row-Level Security in Power BI with NOT IN or NOT EQUAL Rule - RADACAD&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.abylon.hu/blog/multi-level-access-rights-in-dynamic-row-level-security/" target="_blank"&gt;Multi-level access rights in Dynamic Row Level Security - Abylon&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 09:40:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-11-17T09:40:02Z</dc:date>
    <item>
      <title>How to create a proper Multi-(IN) Clause DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-proper-Multi-IN-Clause-DAX-Query/m-p/3535887#M135873</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Scenario&lt;/P&gt;&lt;P&gt;I am trying to implement Dynamic RLS in Power BI and I am trying to add filters into my DAX and failing miserably. I am clearly writing it incorrectly and I also receive an error which I will describe below. And I get the model may be bleh but its what I have to work with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Image I have the following ugly Schema and I want to pull out all the Invoices that are for a specific User. I would think of it like this in SQL Terms&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select * from Invoices where City in (Select City from Cities where State in (Select State from States where Region in (Select Region from Regions where Region in (Select Region from UserfTORegionMapping where EmailAddress = USERPRINCIPLENAME())))&lt;/P&gt;&lt;P&gt;(of course it would simply using = than ins above but its just one way to look at it)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am having no idea how to do this in DAX. I tried playing around with FILTER and IN but going passed a single = or IN and I immediatley and lost.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you Kindly for looking at this and helping&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 22:09:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-proper-Multi-IN-Clause-DAX-Query/m-p/3535887#M135873</guid>
      <dc:creator>PBI_DAX_Newbie</dc:creator>
      <dc:date>2023-11-15T22:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a proper Multi-(IN) Clause DAX Query</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-proper-Multi-IN-Clause-DAX-Query/m-p/3538866#M135984</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="646814" data-lia-user-login="PBI_DAX_Newbie" class="lia-mention lia-mention-user"&gt;PBI_DAX_Newbie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can apply a filter in the table 'Invoices' when create a role with the below formula:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;'Invoices'[City]
    IN CALCULATETABLE (
        VALUES ( 'Cities'[City] ),
        FILTER (
            ALL ( 'Cities' ),
            'Cities'[State]
                IN CALCULATETABLE (
                    VALUES ( 'States'[State] ),
                    FILTER (
                        ALL ( 'States' ),
                        'States'[Region]
                            IN CALCULATETABLE (
                                VALUES ( 'Regions'[Region] ),
                                FILTER (
                                    ALL ( 'UserfTORegionMapping' ),
                                    'UserfTORegionMapping'[EmailAddress] = USERPRINCIPALNAME ()
                                )
                            )
                    )
                )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;In addition, you can refer the following links to get it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://radacad.com/dynamic-row-level-security-in-power-bi-with-not-in-or-not-equal-rule" target="_blank"&gt;Dynamic Row-Level Security in Power BI with NOT IN or NOT EQUAL Rule - RADACAD&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.abylon.hu/blog/multi-level-access-rights-in-dynamic-row-level-security/" target="_blank"&gt;Multi-level access rights in Dynamic Row Level Security - Abylon&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 09:40:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-proper-Multi-IN-Clause-DAX-Query/m-p/3538866#M135984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-17T09:40:02Z</dc:date>
    </item>
  </channel>
</rss>

