Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Calculated dimension based on selected values

Hi,

I feel like this should be relatively straightforward, but my brain is not working today!

In my chart, I have a calculated dimension as I only want to show certain values from my field 'Fruit'.

=MATCH(Fruit,'Apples','Pears','Grapes')

That works fine.

But, I have also created a listbox with an expression, to show 5 out of the 20 possible fruits:

FRUIT

Oranges

Lemons

Nectarines

Kiwis

Passion fruit

In my chart, I would like Apples, Pears and Grapes to always show. But if any of the fruits in the listbox are selected, they should also show on the chart.

I was going down the 'get field selections' route, but haven't come up with a working solution yet.

Am I on the right track? Does anyone have any suggestions?

Many thanks,
Jess

1 Solution

Accepted Solutions
sunny_talwar

Check the attached

View solution in original post

10 Replies
sravanthialuval
Creator
Creator

Please post sample application for better understanding.

jessica_webb
Creator III
Creator III
Author

Sample (hopefully) attached.

sunny_talwar

Check the attached

jessica_webb
Creator III
Creator III
Author

This looks great. Is there anyway to have it without the calculation - i.e. get rid of 'Total'? I have that part in one of several conditional expressions...

sunny_talwar

Get rid of total? Isn't Total the field you are trying to plot?

CarlosAMonroy
Creator III
Creator III

HI Jessica,

I guess there are many ways to do it. What come to my mind right now, is maybe to create 2 expressions in the chart using conditionals for each of those.

The condition should be something like: Match(FruitField,'Fruit1','Fruit2')

Also for the 1st expression you can use set analysis to show the fruits you want and remove the calculated dimension. That will help to the performance too.

Hope that helps,

Carlos M

jessica_webb
Creator III
Creator III
Author

Yes, but I don't want it to be part of the dimension, as it is already used in a conditional expression within the chart.

jessica_webb
Creator III
Creator III
Author

Hi Carlos,

Thanks for your response.

I don't understand how the values would be selected in the listbox, from what you've said...

sunny_talwar

I have not used Total as a dimension, at least I don't see it... or am I missing something

Capture.PNG