Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I understand that If Statements are big no nos in Qlikview.
I have a decent understanding of Set Analysis. My current requirement is to only calculate a value when a single value is selected for the the Store.
=if(GetSelectedCount(Store)=1,'Dogs:'&Count({$<PetType={'Dog'}>} Distinct PetID),'Select a Store')
I am sure this has been answered a few times, please feel free to direct me to an answer. I searched a few ways. I have seen a solution that uses pick match, but I am not sure if that solution applies in this situation.
Thanks in advance
Here is Pick() way to do this
=Pick((GetSelectedCount(Store)=1)+2,'Dogs:'&Count({$<PetType={'Dog'}>} Distinct PetID),'Select a Store')
What are you expecting to see in your text boxes?
I am expecting to see what is there.
I am being told if statements are an absolute no and can not be used due to performance issues. I am just wondering what the alternatives are.
Here is Pick() way to do this
=Pick((GetSelectedCount(Store)=1)+2,'Dogs:'&Count({$<PetType={'Dog'}>} Distinct PetID),'Select a Store')
Your sample file attached
Try with :
=pick(match(GetSelectedCount(Store),1)+1,'Dogs:'&Count({$<PetType={'Dog'}>} Distinct PetID),'Select a Store')
Thanks
I was making this a lot harder than it needed to be. I will see if this works in my application and mark this as the correct answer if so. Thanks again.