Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Read about the latest Qlik Community enhancements on the Community News blog!
Showing results for 
Search instead for 
Did you mean: 

checking syntax for my expression given a variable


I have created a variable with 3 buttons that should change my 2 charts based on these buttons. 

Button 1: Source

Button 2: Fund

Button 3: ALL


Chart 1:  bar graph to show me the count of statuses pending given the selection of a button

if(vSourceFund = 1, count({<Bucket = {"Source"}>} STATUSES),
if(vSourceFund = 2, count({<Bucket = {"Fund"}>} STATUSES),
count({<Bucket> count))

I know my syntax is incorrect but I am trying to achieve the count given the buckets of Source or Fund. And if "ALL" button is selected I want it to count all the buckets. Any thoughts? Thank you.

Labels (3)
10 Replies
Contributor III
Contributor III

Try this

if($(vSourceFund)= 1, count({<Bucket = {"Source"}>} STATUSES),
if($(vSourceFund )= 2, count({<Bucket = {"Fund"}>} STATUSES),
count( {1} Bucket))