Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

can you set a chart to only calculate for specific values?

Hi, I am having trouble filtering a straight table to show only a certain set of values.

Example: Let's say I have a straight table that returns the number of customers and number of dollars spent as expressions as well as 20 other expressions and returns a city as the dimension. I want to filter this entire set to only show those customers who provided e-mail addresses but I do not want to have to add this condition to every expression.

Can I use this condition in the calculation condition field on the General tab? If so, what would be the syntax to do so? I intend to use this table as part of a report export so I don't want the end users to have to select the e-mail provided flag from a list box.

Tags (1)
6 Replies
Highlighted
Honored Contributor II

can you set a chart to only calculate for specific values?

Either work with calculated dimensions, or use the "Suppress when value is Null"-option in the dimension.

HTH
Peter

Highlighted
Not applicable

can you set a chart to only calculate for specific values?

You could put your logic into a calculated dimension. On your first dimension, use something like:

If(Email = 'Y', Name, Null())


The Calculation Condition seems more like an overall condition rather than a record by record. Like if this condition is met show the chart if not, hide the whole chart. I haven't used it in practice, so I could be wrong on that.

I think the best way to handle this is still to put Set Analysis in every expression. Keep in mind, you can define a variable to hold your Set Analysis expressions and then use a dollar-sign expansion along with the variable in each expression to simplify it.

Create a variable, vSet and set its value to your Set Analysis: {<Email = {'Y'}>}.

Then in your expressions, use: Sum($(vSet) Amount).

Highlighted
Not applicable

can you set a chart to only calculate for specific values?

I like the idea of putting the calculation into a variable as it is rather long. I will try that.

Thanks!

Ken

Highlighted
Esteemed Contributor III

can you set a chart to only calculate for specific values?

For my taste, the easiest way is to add email itself as dimension, use "suppress when value is null", and hide it.
It will show up on export. If it is really important, better go with calculated dimension.

Highlighted
Honored Contributor II

can you set a chart to only calculate for specific values?

@ Michael,

agree, but there are so many possible switches around and I personally prefer to enter expessions either in the dimensions or the expressions - this makes it easier to maintain, if you are supposed to change something after a while, as there are normally only two places to look for. Wink

Peter

Highlighted
Esteemed Contributor III

can you set a chart to only calculate for specific values?

@Peter, Whisper
There are so many possible solutions - that's why I didn't press taht yellow "Suggest as Answer"...