Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

6 Replies
prieper
Master II
Master II

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

HTH
Peter

Not applicable
Author

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).

Not applicable
Author

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

Thanks!

Ken

Anonymous
Not applicable
Author

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.

prieper
Master II
Master II

@ 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

Anonymous
Not applicable
Author

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