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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mccollough
Helper I
Helper I

Merge queries with WHERE condition

Hi Everyone!

 

I want to add a column to a table via power query with something analogous to a WHERE clause.

 

Here's a simplified version of what I'm trying to do:


Take the [TASK] from the 'Schedule' Table Where [INCLUDE] = 1

mccollough_0-1636584517380.png


Add the activities into my 'Fact Table' which looks like this

mccollough_3-1636584629490.png


To yield my 'Goal' table which should ideally look like this

mccollough_4-1636584694375.png


Thank you SO MUCH for your continued assistance!

 

 

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

One way to do this would be to add a custom column (all values = 1) to the Fact Table and then do a merge matching columns DATE, NAME, and Custom with DATE, ASIGNEE, and INCLUDE.

 

The other way would be to merge Fact Table with Schedule after filtering the latter for INCLUDE = 1.

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

One way to do this would be to add a custom column (all values = 1) to the Fact Table and then do a merge matching columns DATE, NAME, and Custom with DATE, ASIGNEE, and INCLUDE.

 

The other way would be to merge Fact Table with Schedule after filtering the latter for INCLUDE = 1.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.