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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MarkD1722
Helper I
Helper I

How to have a single year slicer interact with visuals using two separate calendar tables

I have a two sets of visuals on the same page that work off separate calendar tables (this is required because they are working off different date fields in different related tables--i.e., they are performing two different, separate functions).  I would like to have a single year slicer to work both sets of visuals.  How can I achieve this most efficiently.  I figure I need to adapt at least one of my date-related measures to refer to or otherwise use the appropriate calendar table relationhip while I am selecting a single year value.  I have seen solutions for using bridge tables and using the USERELATIONSHIP function.  I cannot determine if there is a solution with either or both of those, or if there is a simpler solution that I am overlooking.  I am also trying SELECTEDVALUE function, but haven't gotten that working correctly either just yet.

 

Thanks.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

The simplest approach would be to add a parent calendar dimension table that controls both of your existing calendar tables.

View solution in original post

3 REPLIES 3
v-jingzhan-msft
Community Support
Community Support

I agree with @lbendlin 's solution. Specifically, you can add a Dim Year table which has all distinct year values in a column. Then link this Dim Year table to both calendar tables on the Year column. That is to use the Year table to filter the calendar tables. The direction of new relationships should be Single from Year to Calendars. Then use this new Year table's Year column in the slicer. 

lbendlin
Super User
Super User

The simplest approach would be to add a parent calendar dimension table that controls both of your existing calendar tables.

Thank you for the replies.  I have tried that, but making the selection of the year still requires something more that I have not figured out.  I agree that the Year table should work (I call it a Year List as there is only a single column of years that relate directly to Year columns in both of the other tables).  It makes sense.  Because of my many other relationships in a large and complex model, I cannot have an active relationship between the Year list and one of the Calendar tables.  This is where I was thinking that USERELATIONSHIP would be a possible avenue towards a solution.  Thoughts?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.