Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Can you help me out on my problem?
I have this table and text box. Here's what I need. I want to show in my text box the distinct count of people having a specified criteria and condition.
Just to give you an idea, here's a sample data on my table:
| Name | Power | Element | HP |
| Batman | Batpower | Dark | 1000 |
| Spiderman | Web | Nature | 900 |
| Aquaman |Trident Strike| Water | 2000 |
On my text box I want to show this kind of expression:
If Element == 'Nature' and HP <= 1000 Then Count Distinct Name
I hope this helps you understand my problems...
Thanks!
35 = Count(DISTINCT Name)
0 = Count({<Element = {Nature}>} DISTINCT Name)
5 = Count({<HP = {"=Sum(HP) <=1000"}>} DISTINCT Name)
Do you think there's something wrong with my expression?
Great, Due to zero issuing facing, May be? Because with in the set analysis , can work as and operator that means It should count when 2 conditions filled. What i state earlier you may not having the Nature as value and Qlik is case sensitive. you can troubleshoot yourself because we don't have any copy file with me..
Do you want me to sen you a sample file?
Off course
might be you are missing ' single quote around value Nature in set analysis {'Nature'}
Like
Count({<Element = {'Nature'}, HP = {"=Sum(HP) <=1000"}>} DISTINCT Name)
Regards,
I believe, Without that it works
What happens if you use this
Count({<Element = {'*Nature*'}>} DISTINCT Name)
Does this give you a value other than 0?
Please wait, I'll create a legit data so that you can check it for yourself.
Hi,
I've used a different data but tried to replicate my whole work problem. I hope this will help you out to check why I get these problems. thanks!
Use this? Because, Sum is not proper with in the set
=Count({<Functional = {'F1'}, Programming = {'P1'}, nAlloc = {"=Sum(Alloc) <= 99"}>} DISTINCT [Resource Name])