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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Create Dimension table from multiple tables

Hi,

 

How do I create a dimension table from multiple (i.e. different) tables? And is DAX or Power Query more preferable? Or both?

 

(Please don't ask me to give a data example, because the question is quite clear). 

 

Regards,

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

If the two tables have one same column but have different value such as ID, we can create a calculated table:

 

IDTable =
UNION (
    DISTINCT ( 'Table A'[ID] ),
    DISTINCT ( 'Table B'[ID] )
)

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I've been making good use of the CROSSJOIN DAX function when creating a new table from existing tables.

 

It can let you turn two tables such as:

FoodType
Fruit
Vegetable

 

CookType
Baked
Fried

 

Into:

FoodTypeCookType
FruitBaked
VegetableBaked
FruitFried
VegetableFried

 

If I'm understanding your question, this is what you're looking for?

 

This can be especially useful with the CALENDAR function / GROUPBY functions if you're combining several tables / want to add a date dimension from thin air. Be careful though - if you have too many dimensions, your record count can grow very quickly.

PaulDBrown
Community Champion
Community Champion

@Anonymous 

 

I take it the reason you need to create a dimension table from different tables is that not one of the tables contains the complete set of values you need as your lookup table, right? (If not, then just in Power Query create a new query referencing the table containing the whole range of values and then create the relevant relationships to the fact tables)

I would do it in Power Query using the append function to add all the necessary tables, removing unwanted columns, and removing duplicates from the main field etc...





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

What if  there is no table having the whole range of values??

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.