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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to put multiple filter conditions in a query?

Hi,

 

My below query is not working, it says I can give only 3 filter conditions for OR.

 

Loan Number MTD = IF(Enco[Current_Month_FileStarted] = 1 || Enco[Current_Month_Application] = 1|| Enco[Current_Month_Processing] =1 || Enco[Current_Month_Submitted] =1 || Enco[Current_Month_CondApproval] =1, Enco[Current_Month_PreCTC] = 1 || Enco[Current_Month_CTC] =1, Enco[Current_Month_DocsOut] =1 || Enco[Current_Month_FundingDate] =1 , Enco[Loan_Number], BLANK())

 

Any other way I can apply multiple OR conditions?

 

Thanks,

Shikha

1 ACCEPTED SOLUTION

If the || operator is not working, you will have to nest multiple ORs

 

Measure =
IF( OR (CondA, 
         OR (CondB,
           OR(CondC, CondD))),
TRUE,
FALSE)

Hope this helps

David

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

What error  are you getting?

 

Try thi s:

 

Loan Number MTD = IF(OR(Enco[Current_Month_FileStarted] = 1 ,
Enco[Current_Month_Application] = 1, Enco[Current_Month_Processing] =1
, Enco[Current_Month_Submitted] =1 , Enco[Current_Month_CondApproval] =1
, Enco[Current_Month_PreCTC] = 1 , Enco[Current_Month_CTC] =1
, Enco[Current_Month_DocsOut] =1 , Enco[Current_Month_FundingDate] =1)
, Enco[Loan_Number], BLANK())

Anonymous
Not applicable

I am getting this error for the query I posted, Too many arguments were passed to the IF function. The maximum argument count for the function is 3.

If the || operator is not working, you will have to nest multiple ORs

 

Measure =
IF( OR (CondA, 
         OR (CondB,
           OR(CondC, CondD))),
TRUE,
FALSE)

Hope this helps

David

Anonymous
Not applicable

Thanks David, it worked!! This community is great.

Anonymous
Not applicable

I am trying your way, but it says we can only put two arguments in OR(Logical 1, Logical 2).

Any other suggestion?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.