<?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 Hide future year(s) from slicer visual in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420372#M129474</link>
    <description>&lt;P&gt;I placed the following "Year" ("Ano") slicer on a report page by adding the year column from the date table 'dData[Ano]':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It however shows a year in the future, since 'dDatas' goes all the way through the end of 2024 (it needs to continue this way). But I need this &lt;STRONG&gt;&lt;U&gt;slicer to show only the current year plus all available past years&lt;/U&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;How can I set a &lt;U&gt;dynamic threshold&lt;/U&gt; that could make the slicer hide this and any other future years that might come up?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried playing with the filter pane but couldn't find anything that could get that done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the filter pane options is to set a top or bottom value, so I created a measure DISTINCTCOUNT( dData[Ano ) to dynamically set this value, but when I place it on the well the "Apply filter" is still greyed out so that's also not working for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I tried creating a measure with GENERATESERIES but the slicer "Field" pane won't even take this measure when I select it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the sense this should be a simple fix, but I ran out of options to the best of my (limited) knowledge and really need that future year (2024 on this case) gone from the slicer. Please help!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 21:45:44 GMT</pubDate>
    <dc:creator>leolapa_br</dc:creator>
    <dc:date>2023-09-07T21:45:44Z</dc:date>
    <item>
      <title>Hide future year(s) from slicer visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420372#M129474</link>
      <description>&lt;P&gt;I placed the following "Year" ("Ano") slicer on a report page by adding the year column from the date table 'dData[Ano]':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It however shows a year in the future, since 'dDatas' goes all the way through the end of 2024 (it needs to continue this way). But I need this &lt;STRONG&gt;&lt;U&gt;slicer to show only the current year plus all available past years&lt;/U&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;How can I set a &lt;U&gt;dynamic threshold&lt;/U&gt; that could make the slicer hide this and any other future years that might come up?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried playing with the filter pane but couldn't find anything that could get that done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the filter pane options is to set a top or bottom value, so I created a measure DISTINCTCOUNT( dData[Ano ) to dynamically set this value, but when I place it on the well the "Apply filter" is still greyed out so that's also not working for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I tried creating a measure with GENERATESERIES but the slicer "Field" pane won't even take this measure when I select it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the sense this should be a simple fix, but I ran out of options to the best of my (limited) knowledge and really need that future year (2024 on this case) gone from the slicer. Please help!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 21:45:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420372#M129474</guid>
      <dc:creator>leolapa_br</dc:creator>
      <dc:date>2023-09-07T21:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hide future year(s) from slicer visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420387#M129476</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="604138" data-lia-user-login="leolapa_br" class="lia-mention lia-mention-user"&gt;leolapa_br&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be done through adding date field in the filters pane and then setting the filters like below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears that your "Year" field is in text format rather than numerial format.&amp;nbsp; Is this correct?&amp;nbsp; Alternatively, you can also untick "2024" in the "Year" field through filters pane.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attach an example pbix file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AlqFfzVTqicpnXnwYGpHFHW9hZaK?e=J0B7Fk" target="_blank"&gt;https://1drv.ms/u/s!AlqFfzVTqicpnXnwYGpHFHW9hZaK?e=J0B7Fk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 21:30:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420387#M129476</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2023-09-07T21:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hide future year(s) from slicer visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420395#M129477</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;&amp;nbsp;and thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I was playing with the filters pane I noticed I could &lt;U&gt;&lt;STRONG&gt;manually&lt;/STRONG&gt;&lt;/U&gt; set limits so the slicer can only show the years up to the current year (2023 as of now), just as you're suggesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, and that's why I highlighted "manually" above, this would only solve the issue at the present moment. Once we get to a new year I would always need to make sure the filter pane is reset to this new upcoming year, and so on, and that unfortunately doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need is a solution that &lt;U&gt;&lt;STRONG&gt;dynamically&lt;/STRONG&gt;&lt;/U&gt; sets the threshold and therefore needs no manual intervention in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And to answer your question, my "Year" field is in numerical format. Only years are shown on the slicer because I have a column 'dDatas[Ano]' on my dates table that only displays the years.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 21:44:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420395#M129477</guid>
      <dc:creator>leolapa_br</dc:creator>
      <dc:date>2023-09-07T21:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hide future year(s) from slicer visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420399#M129479</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="604138" data-lia-user-login="leolapa_br" class="lia-mention lia-mention-user"&gt;leolapa_br&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Certainly.&amp;nbsp; It is better to do it dynamically as you said for easier maintenance.&amp;nbsp; What about setting the filter type as "Relative date" as shown below?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 21:56:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420399#M129479</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2023-09-07T21:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hide future year(s) from slicer visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420451#M129480</link>
      <description>&lt;P&gt;The funny thing is that for me the filter pane does not provide a "Relative date" option probably because Power BI reads my "Year" (dData[Ano]) column as integers values, not as actual dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the good news is that I reached a solution by creating the calculated table below with GENERATESERIES.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then connected the above 'Ano Slicer' table to the date table through dData[Ano] via a one-to-many relationship and when I placed it on the slicer's field pane, voilá, I now have my slice with only the years I want!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My mistake before was that I was replicating this code as a measure, but the slicer's field pane apparently only accepts table columns as data arguments.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 22:48:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Hide-future-year-s-from-slicer-visual/m-p/3420451#M129480</guid>
      <dc:creator>leolapa_br</dc:creator>
      <dc:date>2023-09-07T22:48:52Z</dc:date>
    </item>
  </channel>
</rss>

