Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community,
If I have a filter pane below:
Department
----------------
Supermarket
Bank
Restaurant
And I have a set expression below:
Aggr(Only({$<[Centre_Dept]={XXXXX}>} EmployeeID), EmployeeID)
I will need to replace the XXXXX with the values from the above filter pane (with no selection from user so GetFieldSelections is an option).
Is this possible?
The end result, if I hard code will be this
Aggr(Only({$<[Centre_Dept]={'Supermarket','Bank','Restaurant'}>} EmployeeID), EmployeeID)
I am looking for something that is dynamic without the need of hard coding.
Thanks 🙂
Hi,
Yes, it is possible.
Either you can set possible values explicitly stated in set expression values as: Aggr(Only({$<[Centre_Dept]={$(=Concat(DISTINCT chr(39) & Department & chr(39), ','))}>} EmployeeID), EmployeeID)
.. or you can set possible values implicitly with P function as: Aggr(Only({$<[Centre_Dept]=P(Department)>} EmployeeID), EmployeeID)
I hope it helps.