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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
SHDJason
Advocate II
Advocate II

How to create a look up table of distinct values from values in two different tables?

Hi,

 

I am having a hard time coming up with a good way to handle this.  

 

I have two source tables--one for web data and one for call data.  

 

They share a common column called "tactic". I want to be able to aggregate by tactic across both tables.

 

For instance:

 

placement #1 search produced 5 leads from web visits  

placement #2 banner ads produced 7 leads from phone calls 

placement #3 social ads produced 8 leads from web vistis and phone calls combined

 

I can't simply append the data because the other columns in the tables are very different. 

 

What I thought would be the right approach is to create a lookup table of distinct values for tactic that they could share (same as the date look up table).  

 

Is that the right approach? And if so, how do i do it? I can create a unique table from one source, but can't figure out how to create a unique table from two sources. Is there a better way to do this? 

 

Thanks.

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Your approach is sound. Basically what you want is a query that pulls only the "tactic" column from your first data source. Then you create an Append query that refers to your first query and then pulls the "tactic" column from your second data source and then you remove duplicates. Probably best to use the technique I posted here to put it all into one query. While the blog post is for Merge queries, it also works for Append queries. Same basic technique:

 

http://social.technet.microsoft.com/wiki/contents/articles/32915.power-bi-merge-query-with-m.aspx

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors