Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm new to Qlik,
I have a variable that give 1 or 0 for a list of person (whatever the formula that give 1 or 0 for each person).
How can I count the number of 1 ?
I've tried :
count(
{<Variable>={'1'}} Name
)
But it doesn"t work. Any idea?
Thanks in advance
May be as below:
Count ({<$(=Variable)={1}>} Name)
Hi Thirumala,
You cannot use variable this way in Set Analysis. Try to use expression itself instead.
Upload it if you can.
As Boris pointed out below the above expression will not work.... Below is the expression that will work:
=Count({<Name={"=$(Variable)=1"}>} Name)
Please see the attached sample file for more details. In the sample app I created two fields Id and Name. There are four names which starts with 'A'. I created a Variable and assigned a formula saying if the first letter of the Name is 'A' then 1 else 0. Hope this helps.....
Hi Thirumala,
I wasn't able to open our file as I'm using qlik sense desktop.
but your correction was right! Now it's working !!
Thanks a lot for the help!
As soon as you have only 0´s and 1´s you can Sum(FlagField)