Multiple and/or criteria in PowerPivot or Power Query

bobbonner

New Member
Joined
Nov 15, 2017
Messages
1
I have used PowerPivot in a limited capacity and still learning it’s capabilities. I’ve also stumbled on the amazing ETL-like things that Power Query can do. However, I struggling to see where I can apply some of the SQL logic that seems easier to accomplish in SQL Server or even Business Objects Web Intelligence. How do I do the following?

Pull in a limited data set based on multiple “and/or” criteria. For example, I want a query that does something like…

Select fields where (field a <> x and field b <> y) or (field a <> m and field b i<> n)

It’s easy enough to select fields where there are single or multiple criteria for each field stated separately, but seemingly not so much when they are in combination.

Can PowerPivot or Power Query do this?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Well you could just write sql code and use that as the source in power query. Or you could add a custom column in power query that returns true for the rows you want to keep, then filter on that. The syntax is (case sensitive)

= if [column] = something then xxx else yyy
 
Upvote 0

Forum statistics

Threads
1,224,051
Messages
6,176,084
Members
452,704
Latest member
Michael AA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top