Reply
Regular Visitor
Posts: 26
Registered: ‎07-24-2018
Accepted Solution

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


Accepted Solutions
Senior Member
Posts: 330
Registered: ‎08-25-2016

Re: How to put multiple filter conditions in a query?

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


All Replies
Highlighted
Member
Posts: 50
Registered: ‎04-29-2018

Re: How to put multiple filter conditions in a query?

[ Edited ]

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

Regular Visitor
Posts: 26
Registered: ‎07-24-2018

Re: How to put multiple filter conditions in a query?

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

Any other suggestion?

Regular Visitor
Posts: 26
Registered: ‎07-24-2018

Re: How to put multiple filter conditions in a query?

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.

Senior Member
Posts: 330
Registered: ‎08-25-2016

Re: How to put multiple filter conditions in a query?

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

Regular Visitor
Posts: 26
Registered: ‎07-24-2018

Re: How to put multiple filter conditions in a query?

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