Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Aika
Contributor III
Contributor III

Function on table

Hi, I have this table in Qlik Sense:

Aika_0-1628069495738.jpeg

I would like to have in the table only the Debtors who have all the associated Operations, with Code = 6
so in this case SERVIDIO TERESA, because it has its Operations all with Code = 6, while DI BELLA FRANCESCO no because it has some with Code = 0.
How can it be done?
Using perhaps the function:
Only ([{SetExpression}] [TOTAL [<fld {, fld}>]] expr)
but how exactly?

Thank you...

1 Solution

Accepted Solutions
MayilVahanan

Hi Aika,

Try like below

Only({<Debtors ={"=Count(Distinct code)=1 and code=6"}>} code)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

Hi Aika,

Try like below

Only({<Debtors ={"=Count(Distinct code)=1 and code=6"}>} code)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Aika
Contributor III
Contributor III
Author

Thank you!
One last doubt: if I had to do in a KPI, a count of Debtors returned by the function you suggested:
Only ({<Debtors = {"= Count (Distinct code) = 1 and code = 6"}>} code)

and set the count like this:
Count (Only ({<debtor_name1 = {"= Count (Distinct main_status_code) = 1 and main_status_code = 6"}>} main_status_code))
it gives me an error...

How can I do?

MayilVahanan

Hi

Try like below

Count ({<debtor_name1 = {"= Count (Distinct main_status_code) = 1 and main_status_code = 6"}>} main_status_code)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.