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

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

Reply
ABCD1234
Regular Visitor

Slicer for multiple tables

Hi,

 

I have two tables.

>Table1                                                    

ProductValue
AB 12312
AB 11123
AC 19934
AC 20045
AD 99956

> Table2

ProdSome Value
AB 999100
AC 321200
AD 893300
AD 223400

 

I created a new column "Type" for Table1 as Type = if(LEFT(Table1[Product],2)="AB","Type1",if(LEFT(Table1[Product],2)="AC","Type2",if(left(Table1[Product],2)="AD","Type3","None")))However, the slicer i created using this new column "Type" doesnt filter visuals created using Table2. I tried to define a relationship between the two tables. However, i couldn't do that because the entries in "Product" in Table1 need not necessarily be entries in "Prod" in Table2. The key point here is that all products having the same first two letters are of the same type and i want to filter by this type. Does anyone know how this can be done in Powerbi?

 

Thanks in advance! 

  

1 ACCEPTED SOLUTION

Then you can merge the tables and keep both columns. Following a way that might work in your case.

 

  1.  Let's say your 2 tables are as follows

    Table1Table1Table2Table2

  2.  In Query editor: Select "Merge Queries" - "Merge Queries as New"
    MergeQueries_01.PNG


  3. Select the Product Column in both tables and select "Full Outer" Join
    MergeQueries_02.PNG

  4. Click on the double headed arrow 
    MergeQueries_03.PNG
    This should lead to this table:
    MergeQueries_04.PNG



  5. Select "Add Column" - "Conditional Column" and set up a logic that combines the 2 product columns
    MergeQueries_05.PNG

    Result:
    MergeQueries_06.PNG


  6. Clean up your table by replacing null values, deleting superfluous columns etc.

 

 

Hope this helps!
JJ

View solution in original post

3 REPLIES 3
DoubleJ
Solution Supplier
Solution Supplier

Would it be an option to merge the tables?

The problem is that the values in both the tables are not related, for example the "Value" column in the first table could be Date and the "Some Value" in the second table could be a decimal. 

Then you can merge the tables and keep both columns. Following a way that might work in your case.

 

  1.  Let's say your 2 tables are as follows

    Table1Table1Table2Table2

  2.  In Query editor: Select "Merge Queries" - "Merge Queries as New"
    MergeQueries_01.PNG


  3. Select the Product Column in both tables and select "Full Outer" Join
    MergeQueries_02.PNG

  4. Click on the double headed arrow 
    MergeQueries_03.PNG
    This should lead to this table:
    MergeQueries_04.PNG



  5. Select "Add Column" - "Conditional Column" and set up a logic that combines the 2 product columns
    MergeQueries_05.PNG

    Result:
    MergeQueries_06.PNG


  6. Clean up your table by replacing null values, deleting superfluous columns etc.

 

 

Hope this helps!
JJ

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.