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
Anonymous
Not applicable

Excluding rows with multiple blank columns

Hi there,

 

I'm coming from SPSS where one has the possibility to exclude (I don't want to remove) cases in the data table based on logical operators. In my case I want to exclude cases with blanks in 4 columns which should look about like this:

 

EXCLUDE(FILTER(table,table[GENDER]= "" && table[OPENTOWORK]= "" && table[AGE]= "" && table[WORKINFIELDTOPIC]="" && table[NATIONALITY]= ""))
 
where can I do this in PowerBI and what would the function in PowerBI language look like?
 
Thanks in advance,
 
Adam
1 ACCEPTED SOLUTION

@Anonymous 

 

It seems that you may just Create calculated tables.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi, if you are trying to do a calculation over rows in a table, such as a sum or countrows, then you would use the filter expressions within a measure that uses the CALCULATE statement.  NOT can be used to negate a condition

So add a new measure to your table, and type in the measure statement such as
Total Rows =

CALCULATE(

      COUNTROWS('table'), // or other function that you need

       FILTER('table', 

             NOT ISBLANK(table[GENDER]) && NOT ISBLANK(table[OPENTOWORK]) && NOT ISBLANK(table[AGE])

             && NOT ISBLANK(table[WORKINFIELDTOPIC]) && NOT ISBLANK(table[NATIONALITY])

        )

)

Anonymous
Not applicable

Great answer, thank you! Yet what I'm trying to do is to create a sort of custom filter so that my charts aren't calculated with the rows/cases that lack all essential data. Is there a other function than CALCULATE that could do that?

 

@Anonymous 

@Anonymous 

 

It seems that you may just Create calculated tables.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous 

use isblank like isblank(table[GENDER]) && isblank(table[Age])

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
Anonymous
Not applicable

What command do I use to exclude and where do I write it into? Thanks for the prompt answer!

 

 

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
Users online (6,657)