Forum Discussion

leolapa_br's avatar
leolapa_br
Icon for Resolver II rankResolver II
3 years ago
Solved

Hide future year(s) from slicer visual

I placed the following "Year" ("Ano") slicer on a report page by adding the year column from the date table 'dData[Ano]':     It however shows a year in the future, since 'dDatas' goes all t...
  • leolapa_br's avatar
    leolapa_br
    3 years ago

    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.

     

     

    But the good news is that I reached a solution by creating the calculated table below with GENERATESERIES.

     

     

    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!

     

    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.