<?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: Passing a Filter across Measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3340106#M125341</link>
    <description>&lt;P&gt;Dear Sahir,&lt;BR /&gt;thanks a lot for the great advice, it got me there almost but not the full way yet.&lt;BR /&gt;In my Summary Measure I know get the warning&lt;/P&gt;&lt;P&gt;"A function of type 'PLACEHOLDER' was used in a True/False expression that serves as a table filter expression. This is not allowed."&lt;BR /&gt;I did all steps as suggested such that I have a measure that uses selectedvalue on 'Year[Year]', entered that in my [Summary]-Measure and inserted a slicer on the page. My understanding is that this warning is because of using the "SelectedYear" Measure within CALCULATE, though I would have expected that this is allowed within a Filter-type function.&lt;BR /&gt;Do you have any guess on how I can circumvent my problem?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot and best&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 06:41:59 GMT</pubDate>
    <dc:creator>tobi94MTW</dc:creator>
    <dc:date>2023-07-20T06:41:59Z</dc:date>
    <item>
      <title>Passing a Filter across Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3314830#M124011</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to solve the following issue:&lt;BR /&gt;I have an aggregate measure [Summary] that calls various underlying measures [Components]. In these [Components]-Measures I have a dynamic parameter choice that selects appropriate factors from a parameter list for different years based on the filter context from the [Summary]-Measure.&amp;nbsp;&lt;BR /&gt;My goal is to be able to play around with: "What if I use the Factors from year A for year B?"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To this purpose, I replicated the [Summary]-Measure and now want to "fix" the year component based on some variable (that I can use in a slicer) to be applied for all years. To do so, I use CROSSFILTER to ignore the relationship (that allows the dynamic measure to work and I rely upon) and &lt;STRONG&gt;now only need to somehow tell PowerBI to use a specific year-value when filtering the parameter list that is called in the underlying [Components]-Measures.&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My [Summary]-measure I have tried goes like:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;CALCULATE(&lt;/DIV&gt;&lt;DIV&gt;CALCULATE(&lt;/DIV&gt;&lt;DIV&gt;VAR PRODUCT_ = if(ISFILTERED('PRODUCTS'[Product]),FILTERS('Products'[Product]))&lt;/DIV&gt;&lt;DIV&gt;RETURN&lt;/DIV&gt;&lt;DIV&gt;IF(PRODUCT_ = "A",SUMX('STORE',[SALES_A]),&lt;/DIV&gt;&lt;DIV&gt;IF(PRODUCT_ = "B",SUMX('STORE',[SALES_B]),&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; IF(ISFILTERED('PRODUCTS'[Product]) = false, SUMX('STORE', [SALES_A])+SUMX('STORE',[SALES_B])&lt;/DIV&gt;&lt;DIV&gt;))))&lt;/DIV&gt;&lt;DIV&gt;, CROSSFILTER('Sales'[Year], 'Factors'[Year], None)&lt;/DIV&gt;&lt;DIV&gt;, KEEPFILTERS('Factors'[Year] = 2023)&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The CROSSFILTER-part does what it is supposed to do, yet the KEEPFILTERS-part does not work. The goal is to select a specific row in the parameter list, in the best case not hard coded as here but based on some variable like 'Year'[Year] that can be filtered dynamically in a visual.&lt;BR /&gt;For completion: In the underlying COMPONENTS-measures I call columns from the 'Factors' table with a MAX-function. So if I do not select a specific year value it would always take the highest possible value across all years, instead of the ones from the same year.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks a lot for any suggestions and tips&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 15:34:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3314830#M124011</guid>
      <dc:creator>tobi94MTW</dc:creator>
      <dc:date>2023-07-04T15:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a Filter across Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3333120#M124951</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="566809" data-lia-user-login="tobi94MTW" class="lia-mention lia-mention-user"&gt;tobi94MTW&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Create a measure that retrieves the selected year value from the slicer&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SelectedYear = SELECTEDVALUE('Year'[Year])&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;Modify your [Summary] measure to use the SelectedYear measure&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE(
    CALCULATE(
        VAR PRODUCT_ = IF(ISFILTERED('PRODUCTS'[Product]), FILTERS('Products'[Product]))
        RETURN
            IF(
                PRODUCT_ = "A",
                SUMX('STORE', [SALES_A]),
                IF(
                    PRODUCT_ = "B",
                    SUMX('STORE', [SALES_B]),
                    IF(
                        ISFILTERED('PRODUCTS'[Product]) = FALSE,
                        SUMX('STORE', [SALES_A]) + SUMX('STORE', [SALES_B])
                    )
                )
            )
    ),
    CROSSFILTER('Sales'[Year], 'Factors'[Year], NONE),
    KEEPFILTERS('Factors'[Year] = [SelectedYear])
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Should you need further assistance please don't hesitate to reach out to me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 19:02:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3333120#M124951</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2023-07-16T19:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a Filter across Measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3340106#M125341</link>
      <description>&lt;P&gt;Dear Sahir,&lt;BR /&gt;thanks a lot for the great advice, it got me there almost but not the full way yet.&lt;BR /&gt;In my Summary Measure I know get the warning&lt;/P&gt;&lt;P&gt;"A function of type 'PLACEHOLDER' was used in a True/False expression that serves as a table filter expression. This is not allowed."&lt;BR /&gt;I did all steps as suggested such that I have a measure that uses selectedvalue on 'Year[Year]', entered that in my [Summary]-Measure and inserted a slicer on the page. My understanding is that this warning is because of using the "SelectedYear" Measure within CALCULATE, though I would have expected that this is allowed within a Filter-type function.&lt;BR /&gt;Do you have any guess on how I can circumvent my problem?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot and best&lt;/P&gt;&lt;P&gt;Tobi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 06:41:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Passing-a-Filter-across-Measures/m-p/3340106#M125341</guid>
      <dc:creator>tobi94MTW</dc:creator>
      <dc:date>2023-07-20T06:41:59Z</dc:date>
    </item>
  </channel>
</rss>

