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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Draszor
Helper III
Helper III

limiting Power BI Data Load with the condition based on more than one column

hello, 

 

I have a data source containing multiple columns of data (for many years) for realized projects. most of them are descriptive data (date, project number, project name, WBS element nr and name etc), few of them contain numbers (Actual costs, Forecast costs, budget costs etc). 

 

each change in numbers (any new actual cost, or any change in project forecast) results in generation of new record for the change introduced --> changing project P1 forecast by 20 000€ in Dec'21, would result in the new record in my data source with Dec'21 date, P1 project number, appropriate WBS and rest of descriptive dimensions, then blank in actual Costs (as there was no change in those in Dec'21 and 20 000€ in Forecast cost column.

 

I do not need to move to PBI such projects that have no data for Actual costs or Forecasted costs in years 2019 & 2020. I understand that to build such condition, I need something like :

 

do not load any data for such project numbers, where Actual cost or Forecasted cost are blank  in years 2019 & 2020.
or
load only records for such projects where Actual costs or Forecasted costs are not blank in 2019 or 2020

 

I have no idea how to build such load conditin and searching any load limitations/restrictions did not find anything similar. 

 

thank you for your help

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

There are a bunch of logically equivalent ways to write this using Material Implication and De Morgan's laws.

 

Here are a couple of examples you can use a filter condition:

not (([Year] = 2019 or [Year] = 2020) and ([Actual cost] = null and [Forcasted cost] = null))
[Year] <> 2019 and [Year] <> 2020 or [Actual cost] <> null or [Forcasted cost] <> null

 

Apply any simple filter step to the table so that it generates code that looks like this:

= Table.SelectRows(#"Prev Step Name", each ([Column1] = "X"))

Then replace the filter condition with the multi-column condition you actually need.

= Table.SelectRows(#"Prev Step Name", each
  [Year] <> 2019 and [Year] <> 2020 or [Actual cost] <> null or [Forcasted cost] <> null)

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

There are a bunch of logically equivalent ways to write this using Material Implication and De Morgan's laws.

 

Here are a couple of examples you can use a filter condition:

not (([Year] = 2019 or [Year] = 2020) and ([Actual cost] = null and [Forcasted cost] = null))
[Year] <> 2019 and [Year] <> 2020 or [Actual cost] <> null or [Forcasted cost] <> null

 

Apply any simple filter step to the table so that it generates code that looks like this:

= Table.SelectRows(#"Prev Step Name", each ([Column1] = "X"))

Then replace the filter condition with the multi-column condition you actually need.

= Table.SelectRows(#"Prev Step Name", each
  [Year] <> 2019 and [Year] <> 2020 or [Actual cost] <> null or [Forcasted cost] <> null)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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