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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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})))

View solution in original post

Thejeswar
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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})))

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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