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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
danno
Resolver V
Resolver V

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?

 

@danno 

@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])

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.