Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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
But if I filter another region, I can see all years (selected a region that hasn't 2023 data)
My Language M table
My relationship
The interaction
If someone can help me, thanks
Solved! Go to Solution.
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)
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)
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
101 | |
65 | |
44 | |
37 | |
36 |