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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
jps_HHH
Helper II
Helper II

slicer for multiple tables

I have 3 different tables in the powerBI. However, there is also 3 columns that are common between the three tables.


Table 1:   column X ; P; N; Year; Site; Location 

Table 2:  column A; Z; Year; Site; Location

Table 3: column B; X; Year; Site; Location

 

The dimension of the tables are different betwenn them.

I would like to create 3 slicers: one for "year" that filters all tables; one for "Site", and the othter for "Location"

1 ACCEPTED SOLUTION
Deku
Super User
Super User

If you create a dimensions for year, site and location and setup a 1 many relationship to your tables you can use the dimensions in the slicers.

 

If there are different locations between the tables, for example, you can use the following the make the dimension

 

Distinct(

Union(

Distinct( table1[location] ),

Distinct( table2[location] ),

Distinct( table3[location] )

)

)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @jps_HHH 

 

You will need to create separate dimension tables that will bridge those three tables for each of those dimension

mentioned above.

 

LocationTable =
DISTINCT ( // Ensure unique locations in the final table
    UNION ( // Combine locations from multiple tables
        SELECTCOLUMNS ( table1, "Location", table1[location column] ), // Extract "Location" column from table1
        SELECTCOLUMNS ( table2, "Location", table2[location column] ), // Extract "Location" column from table2
        SELECTCOLUMNS ( table3, "Location", table3[location column] )  // Extract "Location" column from table3
    )
)

Do the same for sites.

YearTable =
//adjust the range accordingly
GENERATESERIES ( 2020, 2025, 1 )

Create a one-to-many single direction relationship from these dimension tables to the fact tables and use them in slicers.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Deku
Super User
Super User

If you create a dimensions for year, site and location and setup a 1 many relationship to your tables you can use the dimensions in the slicers.

 

If there are different locations between the tables, for example, you can use the following the make the dimension

 

Distinct(

Union(

Distinct( table1[location] ),

Distinct( table2[location] ),

Distinct( table3[location] )

)

)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

So, I have to create 3 new tables ? 

Table location:

Distinct(

Union(

Distinct( table1[location] ),

Distinct( table2[location] ),

Distinct( table3[location] )

)

)


Table site:

Distinct(

Union(

Distinct( table1[site] ),

Distinct( table2[site] ),

Distinct( table3[site] )

)

)

Yes


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.