Discussion Board for collaboration related to QlikView App Development.
Hi,
If I wanted to limit a calculation to certain dimension but still let the expression be effected by selection within those categories, how can I do that.
For example, If I want a chart to take the salary sum of only IT and consultants department, my set analysis would be like
sum({<Department = {'Consultants','IT'}>} salary)
It gives me salaries sum of only these two departments
However, If I would like this chart to be still selectable within these two departments, how can I do that. If from the listbox, I select either IT or consultants, it should show me the data only for that department. If no selection is made or any other department is selected, then show sum of both
Arif
Try using $ sign in the above example.
$ = current selection.
Regards
Pavan.
Hi Arif,
Try:
if(Match(GetFieldSelections(Department),'IT','Consultants'),
Sum(Salary),
Sum({<Department={'IT','Consultants'}>}Salary))
edit: removed > 0 as realised from anbu's post this isn't needed!
If(Match(GetFieldSelections(Department),'Consultants','IT'),sum({<Department = {'$(=GetFieldSelections(Department))'}>} Salary), sum({<Department = {'Consultants','IT'}>} salary))
You can also use IF function
=IF(Dept='IT' OR Dept='Consultant',SUM(Salary))
Your solution is te separation of you two set analysis: sum({<Department = {'Consultants'}>} salary) + sum({<Department = { 'IT'}>} salary)
Hi, you can use an operator to filter intersections:
sum({<Department *= {'Consultants','IT'}>} salary)