Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........

.....is it possible?

Basically, I want to group together two sets of expressions on a chart and then use the cycle button to switch between them. I only have one dimension: order week.

For example:

group 1 = sum of sales; average order value

group 2 = count of orders; count of dispatches

Is it possible to group these expressions as above and then use the cycle button to switch view between them?

Thanks in advance.

16 Replies
Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........

If there is, I haven't found it. I've had to use variables to create functionality like that by either setting visibility of a chart object or physically changing the expression used in a single chart based on the set value of a variable.

Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........

Yes you can do this, simply highlight two or more expressions and click on the group button.

If you click on the group button on a single expression it simply adds it with a group to the expression (or group) above.

In terms of macro control etc, you don't have any control over it, but it still functions as a cyclic group of expressions.

Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........


Nigel West wrote:
Yes you can do this, simply highlight two or more expressions and click on the group button.
If you click on the group button on a single expression it simply adds it with a group to the expression (or group) above.
In terms of macro control etc, you don't have any control over it, but it still functions as a cyclic group of expressions. <div></div>


Thanks for the answer, but it doesn't seem possible to highlight more than one expression..........

Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........

Sorry, you're right.

The way to do it is to choose the two expressions you want to group together, ensure they are next to each other, then select the second one and click on group. If you then want to add more, just make sure your new expression is immediately below the group, select it, then click on group.

You are then step by step building up a cyclic group of expressions.

Highlighted
MVP
MVP

cycle through GROUPS of expressions on a chart........

But in this case, it sounds like we don't want one group of all the expressions, or even two groups of two expressions each. We want a single group, where selecting the group changes two expressions at once. I'm not thinking of a direct way to do that.

I am thinking of an indirect way to do that. Create new fields, "Group 1" and "Group 2". Make a cyclic group out of them. Write your chart expressions like this:

if(getcurrentfield(MyGroup)='Group 1',sum(Sales),count(Order))
if(getcurrentfield(MyGroup)='Group 1',avg(OrderValue),count(Dispatch))

Probably even easier in version 9, as you could just have the four separate expressions, and show/hide them based on the selected group. Or make the group a list box if you don't need it to have the little circular arrow icon.

Or just make two charts, and show/hide the charts based on the selected group.

This isn't your data or specific to your example, but attached is an example of using a dimension group as a fake expression group. It's the same idea here, just a little more complicated.

Probably other approaches as well.

Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........


John Witherspoon wrote:
But in this case, it sounds like we don't want one group of all the expressions, or even two groups of two expressions each. We want a single group, where selecting the group changes two expressions at once. I'm not thinking of a direct way to do that.


John, that's exactly what I'm trying to achieve. I'll have a look at the example. Thanks.

Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........

Thanks everyone for the suggestions.

In the end I used an inline table to create a data island and then used conditional show based on the selection.

I'm sure this is one of many solutions.

Highlighted
Not applicable

cycle through GROUPS of expressions on a chart........

I may just be being stupid, but is there a way to label the cycle button?

Highlighted
MVP
MVP

cycle through GROUPS of expressions on a chart........

The example shows the currently-selected expression, if that's what you mean by labeling. If you mean a label like "Please select an expression using the icon below", I'd probably add it with a text box. If you mean show the currently-selected expression for a REAL expression group, I don't know how to do it, which is one reason I tend to use fake expression groups instead.