Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
User | Count |
---|---|
79 | |
74 | |
44 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |