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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis, ignore selection through a variable

Hi All,

I am using a count in my expression.

count(distinct {<[Timesheet ClientID]=>} if(len(trim(Desk))>0 and [Client DeskID]<> 940,ClientID))

I have three levels in my filter. One is GOR, second is Branch and third is Desk. My customer wants to ignore the low levels and only keep the highest level in selection consideration. For example, If clients choses a GOR, and a branch, the count should be shown for GOR as it is the highest level in hierarchy than Branch. If clients choses Branch and Desk, then count should only be shown for Branch and Desk should be ignored in count. If clients only choses one hierarchy, then it should not be ignored. Some sample data For each hierarchy is given below

GOR:                                    

GOR
London
East Midlands


Branch
London
Nottingham


Desk
Derby Primary
London Nursery
London Primay

If it cannot be done simply by selection, I have another method in mind. I have another list box, where I have put the names of the hierarchy,.for example GOR, Branch and desk. I want to store the value from this listbox into a variable and use that in my expression for ignoring a selection. I want that if client selects branch, nothing should be ignored from thse hierarchy. If He selects Branch and Desk, then Desk should be ignored from the count. maybe we could put the value form listbox into a variable. For example, If client selects Branch to be considered in selection and ignore everything, we could set the the branch value in a variable and use this in set analysis above.

If you have come across such a scenario and have a better method in mind, please share it with me.

Regards

Arif

0 Replies