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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
dreweezy
Creator II
Creator II

checking syntax for my expression given a variable

Hi,

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
sivakumar1994
Contributor III
Contributor III

Try this

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