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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
msedlak
Frequent Visitor

Create New Query Based on a Column In Another Query

Hello,

 

I have three queries:

 

1) Customers with customer information

2) Providers in Network

3) Provider Prospects

 

I have done a cross join to join queries 1 and 2 then used a distance formula to determine if a provider in network covers a customer location.  If they are covered I bulit a new column that labels row yes or no.

 

I would like to build a 4th query that is filled only with rows labeled no from query 1.

 

How do I accomplish this?

 

Thank you,

Mark

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

If you want to do this in Power Query, then you would create a query that references your other query. Right click query 1 and choose Reference. Then you would filter for no.

 

In DAX, you would create a new table with a formula like:

 

Table 4 = FILTER('Table 1',[Label] = "No")



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...
amitchandak
Super User
Super User

You can create a new column in table using other tables like

.

New column in Table 1 = maxx(filter(table2,table1[customer] = table2[customer] && table2[option]="construction",table2[value])
New column in Table 1 = maxx(filter(table2,table1[Attribute] = table2[name] && table1[project] = table2[project]),table2[name])

new Column =
LOOKUPVALUE('Table'[Lot No.], 'Table'[Entry Type], "Output", 'Table'[Document No.], firstnonbank('Table'[Document No.],true()))
OR
new Column =
minx(filter('Table', 'Table'[Entry Type]= "Output" && 'Table'[Document No.]= earlier('Table'[Document No.])),'Table'[Lot No.])

In case it does not help

Can you share sample data and sample output.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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