Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

filter flag created in date dimension does not applied to Year slicer

Hi , 

I got a strange issue regarding a calculated column created in dimDate table 

I want user to be able to see only 3 years all objects in report screen , but I want the user be able to enlage the period if needed:

I want this filter to be applied in the following objects :

in report table 

in slicer

the calculation is the folow :

 

_is last 3 years =
var thisYear = year(now())
var currentYear = DimDates[Year]
return
if(thisYear - currentYear >2 ,"No", "Yes")
 
I tested in the data pane and it seems to filter the rows I need (choosing "Yes")
I tried all the 3 options : filter on this visual , on this page , on all page .
In the report , it seems that it filters the years in the table object , as expected.
The problem is on the slicer visualisation.
The filter is not applied on the Year slicer although when I move over with the mouse , it's written :
"filter and slicers affecting this visual :   _is last 3 years is Yes" , but I see all years from 2014 till 2020 - filter is not apllied to slicer 

I use Date Hierarchy generated automatically

In option setting current file --> data load time intelligence is checked 

My source is a local excel file .

I don't have write access to db , I wonder if issue still occur when the flag is created in db date table and not in DAX language.

I hope I am doing something wrong so the solution is simple.

Happy New Year

3 REPLIES 3
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,


is your problem solved?

 

If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

don't use the automatically generated Date Hierarchy.  

Mark your DimDate as date table.

https://docs.microsoft.com/en-us/power-bi/desktop-date-tables

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

take a look at this.

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors