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

Where Clause in chart

Hi there

Could someone please help.

I have a QVD with data like...

Cost Element
Jan Sales
Feb Sales
ProjectText
ABC123345454VS001
ABC1111866VS001
ABC2234454VS001
CCC22277VS001
CCC454577VS001

I would like to know if I can create a chart from this QVD.

Where Cost Element=ABC then only display lines with ABC cost element

then another chart for Cost Element CCC.

Please advise.

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you can either use a calculated dimension

=if([Cost Element]='ABC',[Cost Element]) 

or use set analysis in all of your chart expressions (you need an aggregation function to use set analysis in an expression).

For example, use [Cost Element] as dimension and  (this will aggegate your values!):

=sum({<[Cost Element]={'ABC'}>} [Jan Sales])

The right expressions and dimensions will depend on what you want to show in the chart, of course.

Hope this helps,

Stefan

View solution in original post

3 Replies
Not applicable
Author

Hi,

Sure u can easly achieve the result using Trellis charts.

Create your chart with "Cost Element" as dimension, then use click on Trellis button and "Enable Trellis Chart". Than you can configure the number of Row and the number of Column.

Trellis.jpg

You can use other approachs (like set analysis) but the trellis chart is the most efficient to implement and dinamic (you don't have to change you document if a new cost element is added).

Hope this help.

Marco.

swuehl
MVP
MVP

I think you can either use a calculated dimension

=if([Cost Element]='ABC',[Cost Element]) 

or use set analysis in all of your chart expressions (you need an aggregation function to use set analysis in an expression).

For example, use [Cost Element] as dimension and  (this will aggegate your values!):

=sum({<[Cost Element]={'ABC'}>} [Jan Sales])

The right expressions and dimensions will depend on what you want to show in the chart, of course.

Hope this helps,

Stefan

Not applicable
Author

Hi There

The calculated dimension worked and then I suppress where NULL.

Thanks! you are a star!