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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Custom Supply Dimension Table to Populate Product Category by Month. All help is much appreciated.

Hi all,

 

I do not have the supply listed for product category in my fct_Product table, and therefore need to populate a custom supply value for each Category in my fct_Product table, but for this to also be different by each month.

 

I have my fct_Product table listing all the demand with a Product and Category column, as well as a dim_Date table linked to the Date column in the fct_Product. I now have tried to insert data to create a new dim_Supply table, which lists the value for by each Category for each particular month (DD/MM/YYYY). A simple illustration is shown:

 

Daniel7_0-1673894024660.png


However, I understandably cannot create a relationship in my data model with this new table because when try to I link both Category columns in dim_Supply and fct_Product, “each column contains duplicate values”. Is there any workaround to this, as I feel I might be overcomplicating things? I am hoping to have something I can easily customize in the future since supply can change. 

 

Many thanks for any help

1 ACCEPTED SOLUTION
RemyO
Resolver I
Resolver I

If i understand correctly you want to create a relationship between 2 tables based on 2 columns in each table.

You cant. Instead:

 

Create a concatenated column (new column). For instance Date && " - " && Category

Do that for bot tables and create the join based on that new field

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Yes that seems to work! Thank you for the help

RemyO
Resolver I
Resolver I

If i understand correctly you want to create a relationship between 2 tables based on 2 columns in each table.

You cant. Instead:

 

Create a concatenated column (new column). For instance Date && " - " && Category

Do that for bot tables and create the join based on that new field

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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