<?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: Return value in filter for all rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066637#M106210</link>
    <description>&lt;P&gt;I want to have a formula that returns 2022 for all rows if I have selected 2022 in the year filter. Hence for row with 202101 i want the formula to return 2022, for 202102 return 2022 etc. If I change the year filter to 2023 I want the fomula to write 2023 for all rows. Makes sense?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Johannes&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 16:03:26 GMT</pubDate>
    <dc:creator>jwulcan</dc:creator>
    <dc:date>2023-02-07T16:03:26Z</dc:date>
    <item>
      <title>Return value in filter for all rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066549#M106196</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new here and need some help to get a measure that genereates the year choose in a filter for all rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence when choosing 2022 in the year filter (marked with yellow) I want the measure (2nd coumn) to write 2022 for all rows in the table below. When choosing 2023 I want it to write 2023 for all rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be super appreaciated:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 15:21:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066549#M106196</guid>
      <dc:creator>jwulcan</dc:creator>
      <dc:date>2023-02-07T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return value in filter for all rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066632#M106207</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="510969" data-lia-user-login="jwulcan" class="lia-mention lia-mention-user"&gt;jwulcan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what do you mean by "to write 2022 for all rows in the table below"?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 15:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066632#M106207</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-07T15:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Return value in filter for all rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066637#M106210</link>
      <description>&lt;P&gt;I want to have a formula that returns 2022 for all rows if I have selected 2022 in the year filter. Hence for row with 202101 i want the formula to return 2022, for 202102 return 2022 etc. If I change the year filter to 2023 I want the fomula to write 2023 for all rows. Makes sense?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Johannes&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 16:03:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066637#M106210</guid>
      <dc:creator>jwulcan</dc:creator>
      <dc:date>2023-02-07T16:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Return value in filter for all rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066660#M106213</link>
      <description>&lt;P&gt;To exlain a little bit further. I want to use this Measure for a Switch measure. So if 2022 is chosen as "year" I want a formula to generate 2022 (as requested in my post above). Then I will use this for a Switch formula with different calculations depending on if the year choosen is 2021, 2022 or 2023.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 16:13:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3066660#M106213</guid>
      <dc:creator>jwulcan</dc:creator>
      <dc:date>2023-02-07T16:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Return value in filter for all rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3067598#M106282</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="510969" data-lia-user-login="jwulcan" class="lia-mention lia-mention-user"&gt;jwulcan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you seem just need to get the data from the slicer "Year".&lt;/P&gt;
&lt;P&gt;I think you can try to use the MAX() or selectedvalue() function in it.&lt;/P&gt;
&lt;P&gt;MAX('Slicer table'[Year])&amp;nbsp; &amp;nbsp;or SELECTEDVALUE('Slicer table'[Year])&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;'Slicer table'[Year] is the field you put in the slicer.&lt;/P&gt;
&lt;P&gt;Because your slicer selects the corresponding year, then my current filter context is this year, and this year should be returned in all cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 02:38:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-in-filter-for-all-rows/m-p/3067598#M106282</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-02-08T02:38:37Z</dc:date>
    </item>
  </channel>
</rss>

