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!
I tried this but still got nothing on my textbox
May be this
=Count({<Functional = {'F1'}, [Resource Name] = {"=Sum({<Functional = {'F1'}>}nAlloc) <= 99"}>+<Programming = {'P1'}, [Resource Name] = {"=Sum({<Programming = {'P1'}>}nAlloc) <= 99"}>} DISTINCT [Resource Name])
I am getting?
Thanks Sunny! It worked!
I will translate it into the heroes data and see if this will be good enough
Cheers!
I've checked the script and you've got "Alloc" instead of "nAlloc"
The only thing you might want to change is to use * before the equal sign in set analysis
=Count({<Functional *= {'F1'}, [Resource Name] = {"=Sum({<Functional *= {'F1'}>}nAlloc) <= 99"}>+<Programming *= {'P1'}, [Resource Name] = {"=Sum({<Programming *= {'P1'}>}nAlloc) <= 99"}>} DISTINCT [Resource Name])
This should also work
=Count({<Programming = {'P1'}, [Resource Name]={"=sum(nAlloc)<=99"}>+<Functional = {'F1'}, [Resource Name]={"=sum(nAlloc)<=99"}>} DISTINCT [Resource Name])
Hi,
As per Henric today's post single quote with wild match character won't work correctly.
https://community.qlik.com/blogs/qlikviewdesignblog/2017/09/11/quotes-in-set-analysis
Regards,
Great, thanks for sharing this