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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

Switching not only measure but also dimension in a bar chart, via variable

Hello Community,

I have a following problem. I'm currently using a variable and a switch panel to switch between two counts condition of ordernumbers in a barchart. 

For instance the measures are like that:

if(vFormula='1',
Count({$<Packaging={1},Status={'delivered'},Delivered={1}>}Ordernumbers),
Count({$<Packaging={1},Status-={'delivered'},Delivered={0}>}Ordernumbers))

That works very well as long there is only one Date dimension listed. But if I also need to switch the dimension, because for the already delivered orders I need the actual "delivery date" when it was finished:

if(vFormula='1', DeliveryDate.autoCalendar.Date, GeneralDate.autoCalendar.Date)

Sometimes the switching works, but after two or more times it seems that he doesn't keep up the speed of switching like the measure. As if it stuck with the last dimension. Almost like a bug.

Does someone has a solution to that?

Thank you in advance.

Best. 

1 Solution

Accepted Solutions
tm_burgers
Creator III
Creator III

I can't replicate the error; but I would ensure that you wrap your formula in :

$(vFormula)

and you don't need the quotes around 1, since its a numeric value.

 

Just ensure your button input value looks something like below:

=if($(vFormula)=1,0,1)

View solution in original post

1 Reply
tm_burgers
Creator III
Creator III

I can't replicate the error; but I would ensure that you wrap your formula in :

$(vFormula)

and you don't need the quotes around 1, since its a numeric value.

 

Just ensure your button input value looks something like below:

=if($(vFormula)=1,0,1)