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! Learn more

Reply
RichFlorida
Helper V
Helper V

Page filter with two conditions

I have the following SQL statement with an OR condition impacting two different columns:

 

 

Select *
From tableA
Where (DeptName is not Null OR DivisionName is not Null)

 

 

How do I add this where close condition as a "Page FIlter" in PowerBI Desktop.

 

Thanks!

2 ACCEPTED SOLUTIONS

hi @RichFlorida ,'

there is "AND" / "OR" selection right under null.

 

select "And" , drop in the other required field and condition similar to the steps above.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

View solution in original post

manvishah17
Solution Supplier
Solution Supplier

Hi @RichFlorida ,
You can try this measure

 

IncludeMeasure = IF(NOT(ISBLANK(MAX([DeptName]))) || NOT(ISBLANK(MAX([DivisionName]))), 1, 0)

 

or 

  • Create a Calculated Column:

    IncludeRow = IF(NOT(ISBLANK([DeptName])) || NOT(ISBLANK([DivisionName])), 1, 0)
  • Add a Table Visual:

    • Go to the Report view.
    • Add a new table visual to your report.
  • Add Fields to the Table Visual:

    • Drag and drop the fields you want to display from your table into the table visual.
    • Drag and drop the IncludeRow column into the Filters pane of the visual.
    • Set the filter condition to show rows where IncludeRow is 1.

 

 

View solution in original post

4 REPLIES 4
manvishah17
Solution Supplier
Solution Supplier

Hi @RichFlorida ,
You can try this measure

 

IncludeMeasure = IF(NOT(ISBLANK(MAX([DeptName]))) || NOT(ISBLANK(MAX([DivisionName]))), 1, 0)

 

or 

  • Create a Calculated Column:

    IncludeRow = IF(NOT(ISBLANK([DeptName])) || NOT(ISBLANK([DivisionName])), 1, 0)
  • Add a Table Visual:

    • Go to the Report view.
    • Add a new table visual to your report.
  • Add Fields to the Table Visual:

    • Drag and drop the fields you want to display from your table into the table visual.
    • Drag and drop the IncludeRow column into the Filters pane of the visual.
    • Set the filter condition to show rows where IncludeRow is 1.

 

 

RichFlorida
Helper V
Helper V

Hi @adudani 

 

Thak you for your reply. Unfortunatly this does NOT answer my questions.

 

I need to add a single filter having to do with TWO columns.

The filter should exclude any records that have two values null at the same time (DeptName & DivisionName). If only one value is null, then it is ok to incude the record.

 

Any ideas greatly apreciated!

 

 

 

hi @RichFlorida ,'

there is "AND" / "OR" selection right under null.

 

select "And" , drop in the other required field and condition similar to the steps above.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash
adudani
Super User
Super User

hi @RichFlorida ,

 

please see the below image dispaying where page filters are added.

 

adudani_0-1720473256368.png

 

1. Open the filters pane

2. Filters on this page 

3. Drag and drop the field 

4. filter  type = advanced filtering

5. show items when the value = is not

6. condition

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

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 Solution Authors