Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Ian1
Contributor II
Contributor II

Variables in Set Analysis

Hi All,

I'm fairly new to Qlik and looking for some help.

I've been looking to use the variable input tool to alter what is being displayed on my sheet similar to a filter.

The set analysis below displays tickets raised:

Count({$<Open_Date={">=$(=yearstart(today()))"}, Status-={'Cancelled'}, System-={'Q-Pulse'}, [Assignment Group]={'$(vVar)'}>} Open_Date )

Is it possible to use the variable input visual as a button which will set the assignment group to either all or a specific team?

I have tried using '*' for the input but that does not work. I have managed to get it working for the specific team just need guidance on how to display all.

Thanks

1 Solution

Accepted Solutions
Ian1
Contributor II
Contributor II
Author

Managed to get it working.

Count({$<Open_Date={">=$(=yearstart(today()))"}, Status-={'Cancelled'}, [Assignment Group]={'$(vVar)'}>} Open_Date )

 

I  used '(*)' and that worked 

View solution in original post

4 Replies
andoryuu
Creator III
Creator III

What happens if you flip your action between [Assignment Group]={'$(vVar)'} and [Assignment Group]= 

The empty equals sign (and technically you don't even need the equals sign) expands to an entire set.

dplr-rn
Partner - Master III
Partner - Master III

you can put the full set analysis part in the variable.

e.g.

Sum( {<$(vSetVariable)>} Open_Date )

customize the variable to include [Assignment Group]={'DepartmentName'} only if needed

Ian1
Contributor II
Contributor II
Author

Thanks for your fast reply!

I've tried that just now using this:

Count({$<Open_Date={">=$(=yearstart(today()))"}, Status-={'Cancelled'}, $(vSetVariable)>} Open_Date )

It works when the variable is just set as [Assignment Group]

but it gives an error when it set it as [Assignment Group]={'The Team'} and gives nothing and no error when set as =[Assignment Group]='The Team'

Ian1
Contributor II
Contributor II
Author

Managed to get it working.

Count({$<Open_Date={">=$(=yearstart(today()))"}, Status-={'Cancelled'}, [Assignment Group]={'$(vVar)'}>} Open_Date )

 

I  used '(*)' and that worked