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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
rafacastro
New Member

Calendar slicer not being affected by other slicers

I have a Calendar table created in the Power Query, using M. One row for each day, just like a normal calendar table. And I have a table called MJE with the posting date. I created the relationship between them, 1 (calendar) to many (MJE). I added a slicer with the year, but when filtering another slicer with data from the MJE table, nothing happens with the 'Year' slicer, the interaction is correct, the relationship is active. The other way is woking, when I filter the Year, it affects the whole report

 

In this image, if I filter 2023, I can only see 6 regions

1.png

 

 

 

 

 

 

 

 

 

 

 

But if I filter another region, I can see all years (selected a region that hasn't 2023 data)

rafacastro_0-1742484732711.png

 

 

My Language M table

 

rafacastro_1-1742484791845.png

 

My relationship

 

rafacastro_2-1742484861663.png

The interaction

 

rafacastro_3-1742484929632.png

 

 

If someone can help me, thanks

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

The date table isn't being filtered because the relationship is one-way, i.e. filters flow from the date table to the rest of the model, they do not flow from the rest of the model to the date table. This is correct behaviour and you shouldn't change that relationship.

Instead use a measure as a filter on the slicer, to show when the value is not blank. You can use an existing measure that only returns values when a valid year is selected.

View solution in original post

Thanks

I added this measure to my calendar table and it worked

DatesWithData =
VAR RecordCount = CALCULATE(
COUNT(MJE[Posting Date]),
RELATEDTABLE(MJE)
)
RETURN IF(RecordCount > 0, 1, 0)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

The date table isn't being filtered because the relationship is one-way, i.e. filters flow from the date table to the rest of the model, they do not flow from the rest of the model to the date table. This is correct behaviour and you shouldn't change that relationship.

Instead use a measure as a filter on the slicer, to show when the value is not blank. You can use an existing measure that only returns values when a valid year is selected.

Thanks

I added this measure to my calendar table and it worked

DatesWithData =
VAR RecordCount = CALCULATE(
COUNT(MJE[Posting Date]),
RELATEDTABLE(MJE)
)
RETURN IF(RecordCount > 0, 1, 0)

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors