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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Filter out rows with multiple conditions

Hi, 

 

I am having troubles with filtering out a few rows from my data set. I have created a small example below. I want to exclude the rows where [ContractNO] = MM005 and where [Number] = 100, 101, 102, 103 and 104. The expected result are seen in picture 2. 

linwer_0-1629883473742.png

 

And the expected outcome to:

linwer_1-1629883505796.png

Hope someone can help me.

 

Best regards

Line

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Create a measure like this one and use it with other non summarized columns

 

countrows(filter(Table, not([ContractNO] = "MM005" && [Number] in{ 100, 101, 102, 103 , 104})))

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

View solution in original post

Thejeswar
Super User
Super User

Hi @Anonymous ,

This might be because the Number Column might be an integer. Try changing it to Text Datatype.

View solution in original post

3 REPLIES 3
Thejeswar
Super User
Super User

Hi @Anonymous ,

This might be because the Number Column might be an integer. Try changing it to Text Datatype.

amitchandak
Super User
Super User

@Anonymous , Create a measure like this one and use it with other non summarized columns

 

countrows(filter(Table, not([ContractNO] = "MM005" && [Number] in{ 100, 101, 102, 103 , 104})))

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

I have tried to create the measure in my dataset, but get an error saying that the function does not support comparing values of type integer with values of type text. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.