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
axecap
Frequent Visitor

DaX or Power Query for creating new tables

I have a few tables that I'm joining together in the data pane of Power BI using Dax like this. I just want a table that starts with distinct emails from two different tables. 

 

new_table = DISTINCT(UNION(SUMMARIZE(Hubspot,Hubspot[hubspot_email]),SUMMARIZE(platform2,platform2[Partner email])))

 

 It seems to work fine but is this something I should be doing in Powerquery instead? Would it be faster, or just better practice? If so, how would you do it in PQ? 

Thanks!!

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

While what you've done is fine, one way to do it in the query editor:

1. Right click on one of your queries/tables and choose "Reference"

2. In that new query, select your Email column, right click and choose Remove Other Columns

3. Create a Reference query from your other table with email column

4. Do same as step 2 with it

5. Rename the Email column to exactly match (case sensitive) the one in step 2

6. Choose append and add the query from step 2

7. Remove Duplicates

8. Right click on the step 2 query and uncheck enable load

9. Name and load the combined email table

 

It's a lot of steps but they can be done quickly.

 

Pat

Microsoft Employee

View solution in original post

2 REPLIES 2
axecap
Frequent Visitor

Thanks Pat, that is a nice simple way to do that in PQ instead.

ppm1
Solution Sage
Solution Sage

While what you've done is fine, one way to do it in the query editor:

1. Right click on one of your queries/tables and choose "Reference"

2. In that new query, select your Email column, right click and choose Remove Other Columns

3. Create a Reference query from your other table with email column

4. Do same as step 2 with it

5. Rename the Email column to exactly match (case sensitive) the one in step 2

6. Choose append and add the query from step 2

7. Remove Duplicates

8. Right click on the step 2 query and uncheck enable load

9. Name and load the combined email table

 

It's a lot of steps but they can be done quickly.

 

Pat

Microsoft Employee

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.