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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

One slicer for two tables

Hi,

 

I have the two tables below and would like to create three slicers, Region,Year,Month;

 

But i do not have any way of creating a true relashionship between the two tables is this possible to do via dax?

 

RegionYearMonthTarget
UK2018Jan212
EU2017Feb122
USA2016March12
RegionYearMonthRev
UK2018Jan23322323
EU2017Feb32323
USA2016March232323

Thanks

 

Peter

1 ACCEPTED SOLUTION

Here's what you generally do. Just copy and paste your query for one of your tables. Remove all of the other columns other than the one that you are interested in, let's say "Year". Remove duplicates. Save as your Year table. Now, if a new year is added in the data, you will automatically get it in your Year table.

 

If you have some values in one table and some in another, then what you want to do is do as above and then repeat for your other table and then create an Append query to append them together and remove duplicate values. Now you have a dimension table that has all of the possible values in both of your tables.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

I would recommend creating a Region table, Year table and Month table. Relate these tables to both of your tables. Use the common tables as the slicers.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Sounds like a plan!

 

Would it best to ref the tables if any new values every get updated? can you even do that?

 

And if you can how? 🙂

 

Thanks

 

Peter

Here's what you generally do. Just copy and paste your query for one of your tables. Remove all of the other columns other than the one that you are interested in, let's say "Year". Remove duplicates. Save as your Year table. Now, if a new year is added in the data, you will automatically get it in your Year table.

 

If you have some values in one table and some in another, then what you want to do is do as above and then repeat for your other table and then create an Append query to append them together and remove duplicate values. Now you have a dimension table that has all of the possible values in both of your tables.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you that worked

Awesome, and we made it through the entire thread without any reference to girls or cups or anything...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.