The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Solved! Go to Solution.
The simplest approach would be to add a parent calendar dimension table that controls both of your existing calendar tables.
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.
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?