Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
mapratt82
Contributor

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

Re: Converting Count to If Statement

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)

6 Replies
rupamjyotidas
Valued Contributor

Re: Converting Count to If Statement

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
Contributor

Re: Converting Count to If Statement

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

Re: Converting Count to If Statement

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
Contributor

Re: Converting Count to If Statement

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

Re: Converting Count to If Statement

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
Contributor

Re: Converting Count to If Statement

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