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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jesusssss
Helper II
Helper II

Need help with relating two tables with the same column for dropdown filtering in Power B

Hi there, I'm having an issue with trying to relate two tables that have the same column.

 

I have a table called "Material entradas" that has a "provider" column, and then I have another table called "prueba" that also has a "provider" column. I want to relate these two columns so that I can create a dropdown and filter the data by provider, and have two independent measures from each table show up.

jesusssss_0-1680174971354.png

 

When we filter by any provider, we want both measures, which are independent from each table, to change.

jesusssss_1-1680174995948.png

These are the measures:

Measure 5 = COUNT('no conformidad proveedor'[ref])

Measure 6 = COUNT('18-Material entradas'[Ref])

We tried to relate them using a many-to-many relationship, but it didn't work.

 

Thank you very much for your help.

 

3 REPLIES 3
johnt75
Super User
Super User

Create a provider dimension table with the unique values from both tables. You can either do this in power query or in DAX like

Providers =
DISTINCT (
    UNION (
        DISTINCT ( 'prueba'[Provider] ),
        DISTINCT ( 'Material entradas'[Provider] )
    )
)

Create one-to-many relationships from this new table to both fact tables and then use the new column in any visuals, filters or slicers.

Hi @johnt75 

I have already tried the method you told me and it has joined the two provider tables correctly

jesusssss_0-1680255356877.png

 

but when I try to relate them from one to many, it doesn't let me and it gives me this error.

jesusssss_1-1680255388482.png

Thanks for the help 

Hello,

Were you able to find the solution, I am having a similar issue on my side.

regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.