<?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 Variable for multiple REMOVEFILTERS in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3078780#M107172</link>
    <description>&lt;P&gt;Is it possible to write a variable that references multiple REMOVEFILTERS i.e. duplicate this but use the variable instead?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = rank1,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 04:08:30 GMT</pubDate>
    <dc:creator>DRA885</dc:creator>
    <dc:date>2023-02-14T04:08:30Z</dc:date>
    <item>
      <title>Variable for multiple REMOVEFILTERS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3078780#M107172</link>
      <description>&lt;P&gt;Is it possible to write a variable that references multiple REMOVEFILTERS i.e. duplicate this but use the variable instead?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = rank1,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 04:08:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3078780#M107172</guid>
      <dc:creator>DRA885</dc:creator>
      <dc:date>2023-02-14T04:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for multiple REMOVEFILTERS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3079850#M107283</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="504102" data-lia-user-login="DRA885" class="lia-mention lia-mention-user"&gt;DRA885&lt;/a&gt; , I doubt that you have use table or column names. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you can have removefilters in a var and use in calculate&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 15:43:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3079850#M107283</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-02-14T15:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for multiple REMOVEFILTERS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3080338#M107322</link>
      <description>&lt;P&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Capsule Descriptions', 'Cost Centers', 'Discipline Groups' &amp;amp; 'Project Listing' are table names.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So to ask my question again, how do I write a VAR for the REMOVEFILTERS part of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, this is the full measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Proposal Rated = 
VAR ActualFilter =
    FILTER (
        'Actual &amp;amp; Forecast Project Resources',
        'Actual &amp;amp; Forecast Project Resources'[Full or Rated Hrs] = "Rated"
            &amp;amp;&amp;amp; 'Actual &amp;amp; Forecast Project Resources'[Consolidated Hours Type] = "Proposal HOS's"
    )
VAR Rank1 =
    CALCULATE ( MIN ( 'Proposal Table'[Prospect Rank] ), ActualFilter )
VAR Result1 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 1] = "Rank 1 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = rank1,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank2 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        'Proposal Table'[Prospect Rank] &amp;lt;&amp;gt; Rank1
    )
VAR Result2 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 2] = "Rank 2 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank2,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank3 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank] IN { Rank1, Rank2 } )
    )
VAR Result3 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 3] = "Rank 3 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank3,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank4 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank] IN { Rank1, Rank2, Rank3 } )
    )
VAR Result4 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 4] = "Rank 4 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank4,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank5 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank] IN { Rank1, Rank2, Rank3, Rank4 } )
    )
VAR Result5 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 5] = "Rank 5 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank5,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank6 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank] IN { Rank1, Rank2, Rank3, Rank4, Rank5 } )
    )
VAR Result6 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 6] = "Rank 6 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank6,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank7 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank] IN { Rank1, Rank2, Rank3, Rank4, Rank5, Rank6 } )
    )
VAR Result7 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 7] = "Rank 7 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank7,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank8 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank]
            IN { Rank1, Rank2, Rank3, Rank4, Rank5, Rank6, Rank7 } )
    )
VAR Result8 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 8] = "Rank 8 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank8,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank9 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank]
            IN { Rank1, Rank2, Rank3, Rank4, Rank5, Rank6, Rank7, Rank8 } )
    )
VAR Result9 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 9] = "Rank 9 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank9,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Rank10 =
    CALCULATE (
        MIN ( 'Proposal Table'[Prospect Rank] ),
        ActualFilter,
        NOT ( 'Proposal Table'[Prospect Rank]
            IN { Rank1, Rank2, Rank3, Rank4, Rank5, Rank6, Rank7, Rank8, Rank9 } )
    )
VAR Result10 =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 10] = "Rank 10 Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            'Proposal Table'[Prospect Rank] = Rank10,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' )
        ),
        BLANK ()
    )
VAR Result10Plus =
    IF (
        [HT Max] = "Proposal HOS's"
            &amp;amp;&amp;amp; [Sel value 10+] = "Rank 10+ Rated",
        CALCULATE (
            [FTE Sum],
            ActualFilter,
            REMOVEFILTERS ( 'Capsule Descriptions' ),
            REMOVEFILTERS ( 'Cost Centers' ),
            REMOVEFILTERS ( 'Discipline Groups' ),
            REMOVEFILTERS ( 'Project Listing' ),
            'Proposal Table'[Prospect Rank]
                &amp;gt; IF ( rank10 = BLANK (), "", rank10 )
        ),
        BLANK ()
    )
RETURN
    Result1 + Result2 + Result3 + Result4 + Result5 + Result6 + Result7 + Result8 + Result9 + Result10 + Result10Plus&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Just creating the VAR ActualFilter massively improved the run time of this measure (4500 m/s to 500m/s) so I was hoping that utilising another variable for the REMOVEFILTERS might offer similar gains in efficiency&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 21:38:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-for-multiple-REMOVEFILTERS/m-p/3080338#M107322</guid>
      <dc:creator>DRA885</dc:creator>
      <dc:date>2023-02-14T21:38:58Z</dc:date>
    </item>
  </channel>
</rss>

