Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mapratt82
Creator
Creator

Converting Count to If Statement

I'm currently using the follow count statement and it works beautifully:

Count({<Access_Id = {"=count(distinct{<DDA_External_Tran_Code={'5'}, Account_Status-={'Closed'}, MobileCapture={'Yes'}>}DDA_Description_Link)>4"}>}distinct Access_Id)

I need to change to either a set analysis or if statement that will give me the actual Access_Id or Tax_Id_Number instead of the count. The following is what I have but keep getting an error:

if(({<Access_Id ={=count(distinct{<DDA_External_Tran_Code={'5'}, Account_Status-={'Closed'}, MobileCapture={'Yes'}>}DDA_Description_Link)>4}>}),Tax_Id_Number)

Please help.

Thanks

Mark

1 Solution

Accepted Solutions
sunny_talwar

I did not know that this was being used as a dimension, try this may be:

Aggr(If(Count(DISTINCT {<DDA_External_Tran_Code={'5'}, Account_Status-={'Closed'}, MobileCapture={'Yes'}>} DDA_Description_Link) > 4, Tax_Id_Number), Access_Id)

View solution in original post

6 Replies
rupamjyotidas
Specialist
Specialist

Maybe this

if(Count({<Access_Id = {"=count(distinct{<DDA_External_Tran_Code={'5'}, Account_Status-={'Closed'}, MobileCapture={'Yes'}>}DDA_Description_Link)>4"}>}distinct Access_Id)>0,Access_Id)

mapratt82
Creator
Creator
Author

Thanks, unfortunately it didn't work. It gave me an invalid dimension error.

sunny_talwar

May be this:

Only({<Access_Id ={"=Count(DISTINCT {<DDA_External_Tran_Code={'5'}, Account_Status-={'Closed'}, MobileCapture={'Yes'}>} DDA_Description_Link)>4"}>} Tax_Id_Number)

mapratt82
Creator
Creator
Author

It gave me an ok on the formula, but an invalid dimension error. Thanks though!

sunny_talwar

I did not know that this was being used as a dimension, try this may be:

Aggr(If(Count(DISTINCT {<DDA_External_Tran_Code={'5'}, Account_Status-={'Closed'}, MobileCapture={'Yes'}>} DDA_Description_Link) > 4, Tax_Id_Number), Access_Id)

mapratt82
Creator
Creator
Author

I'm sorry about that I guess I should have mentioned that. This worked, so thank you so much!!!