Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cycling Multiple expressions

Is there a way to cycle multple expressions at the same time? I have a tabular chart with thirteen columns, one for the customer name (the dimension), and one expression for each month. I'd like to be able to cycle from dollars to units in all twelve months simultaneously. Can this be done?

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Write each expression something like this:

     if(vExprFlag = 1, sum(Dollars),sum(Units))

Create a variable vExprFlag and set to 1.

Create a button that cycles the value of the variable between 1 and 0 when clicked.

View solution in original post

6 Replies
m_woolf
Master II
Master II

Write each expression something like this:

     if(vExprFlag = 1, sum(Dollars),sum(Units))

Create a variable vExprFlag and set to 1.

Create a button that cycles the value of the variable between 1 and 0 when clicked.

Not applicable
Author

What mwoolf has suggested will work. Another idea is to have a list box that contains 'Dollars' and 'Units', and the user can select which view they want to see.  See attached.

Not applicable
Author

Thanks. That worked. As did Rebeccad's suggestion.

Next question: Is it possible to change the column formatting
dynamically from integer to money when I make the switch?

Also, is there a good reference on the API? I looked at
the API Guide.qvw but it looks pretty lame. I have a VB
background but I'd like to find out more about the classes, properties
and methods available.

Not applicable
Author

Thanks. That worked. As did Rebeccad's suggestion.

Next question: Is it possible to change the column formatting
dynamically from integer to money when I make the switch?

Also, is there a good reference on the API? I looked at
the API Guide.qvw but it looks pretty lame. I have a VB
background but I'd like to find out more about the classes, properties
and methods available.

MayilVahanan

Hi

Try like this

if(vExprFlag = 1, Num(sum(Dollars),'$#,##0.00'),Num(sum(Units)),'#,##0'))

And Number format , select as Expression Default.

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks. That worked. As did Rebeccad's suggestion.

Next question: Is it possible to dynamically change the column formatting from integer to money when the switch from units to dollars occurs?

Also, is there a good reference for the API? I looked at the API Guide.qvw but it seems pretty lame. I'd like to get a better handle on the classes, properties and methods available.