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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Connecting fact tables to dimensions via grouping or Power Query?

Dear Community, 

 

I currently have the pleasure of creating a datamodel from scratch, and would therefore like to do it with the current best practices.

The situation is the following:

 

I have a column called "device_category" in 2 different tables (social media data). I would like to have them both be able to connect to a device dimension, with 2 values: "Smartphone" and "Tablet".

Table A contains the 2 distinct values: "Smartphone" and "Tablet".

Table B contains the 4 distinct values: "android_phone", "iphone", "android_tablet" and "ipad".

 

Here's the question:

Should I make a column in Power Query for table B, or make a grouping of the values that match, or something else?

An explaination of your suggestion would be much appreciated. 

 

Best regards

Andreas

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a column in table B first using if in power query

 

if [Col] = "android_phone" or [Col] = "iPhone" then "Smartphone" else "Tablet"

 

Now create a table with these two values (using power query , add as new query or edit data or distinct in dax)

 

and join with both the tables and use

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create a column in table B first using if in power query

 

if [Col] = "android_phone" or [Col] = "iPhone" then "Smartphone" else "Tablet"

 

Now create a table with these two values (using power query , add as new query or edit data or distinct in dax)

 

and join with both the tables and use

Helpful resources

Announcements
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.