Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a data model which has many to many relationships between several tables. I've provided one example below, where the relationship in the model is FACT_CALL_TABLE.Advertisement_ID to DIM_AD_TABLE.Advertisement_ID. This relationship is many-to-many, however the combinaton of Advertisement_ID & Store_Location makes the relationship many-to-one.
Is it possible for me to join Advertisement_ID and Store_Location to create a unique key between both tables?
Solved! Go to Solution.
Hi @ERing ,
You definely can do this in Power BI.
You need to create a calculated column in both tables. This calculated column should concatenate Advertisement_ID and Store_Location. Now join FACT_CALL_TABLE and DIM_AD_TABLE using this new calculated column.
Below would be your DAX for Calculated column in FACT_CALL_TABLE:
Unique_Key_Fact_Table = CONCATENATE(FACT_CALL_TABLE[Advertisement_ID], FACT_CALL_TABLE[Store_Location])
Below would be your DAX for Calculated column in DIM_AD_TABLE:
Unique_Key_Dim_Table = CONCATENATE(DIM_AD_TABLE [Advertisement_ID], DIM_AD_TABLE [Store_Location])
Now go to model view and join both tables on FACT_CALL_TABLE.Unique_Key_Fact_Table = DIM_AD_TABLE.Unique_Key_Dim_Table
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
@ERing ,
Yes.
In case you don't want to use CONCATENATE function, you can simply use FACT_CALL_TABLE[Advertisement_ID] & FACT_CALL_TABLE[Store_Location] for concatenating.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
Hi @ERing ,
You definely can do this in Power BI.
You need to create a calculated column in both tables. This calculated column should concatenate Advertisement_ID and Store_Location. Now join FACT_CALL_TABLE and DIM_AD_TABLE using this new calculated column.
Below would be your DAX for Calculated column in FACT_CALL_TABLE:
Unique_Key_Fact_Table = CONCATENATE(FACT_CALL_TABLE[Advertisement_ID], FACT_CALL_TABLE[Store_Location])
Below would be your DAX for Calculated column in DIM_AD_TABLE:
Unique_Key_Dim_Table = CONCATENATE(DIM_AD_TABLE [Advertisement_ID], DIM_AD_TABLE [Store_Location])
Now go to model view and join both tables on FACT_CALL_TABLE.Unique_Key_Fact_Table = DIM_AD_TABLE.Unique_Key_Dim_Table
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
@ERing ,
Yes.
In case you don't want to use CONCATENATE function, you can simply use FACT_CALL_TABLE[Advertisement_ID] & FACT_CALL_TABLE[Store_Location] for concatenating.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
12 | |
9 | |
8 |
User | Count |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |