Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Separating Data in Line Charts

I created a line chart that tracks the average of two different percentages across a number of weeks. In the Excel sheet I drew the data from, the percentage averages are drawn from a number of different regions. I want to create multiple line charts, one for each region, so that that the percentages for each of the different regions can all be viewed simultaneously without gumming up a single line chart. When looking at all the regions together I have two different measures which are Avg([Percentage 1]) and Avg([Percentage 2]). When I try to alter one of those to Avg([Percentage 1]) IF Region = Canada it alters that line but the other line gets dropped and if I try to also change the second measure into Avg([Percentage 2]) IF Region = Canada both lines disappear. What can I do to restrict my data to only Canada (or the other countries)?

Tags (1)
2 Replies
MVP
MVP

Re: Separating Data in Line Charts

I'd recommend to use a Trellis chart with Country as the first (trellis) dimension

MVP
MVP

Re: Separating Data in Line Charts

Oops, sorry I didn't notice that the question pertains to Qlik Sense... Trellis are only available in QlikView for now.

In Sense, you should use one of the techiques for Conditional aggregation - either IF() functions, or Set Analysis:

Avg(If(Country = 'Canada', [Percentage 1]))


or


Avg({<Country={Canada}>}   [Percentage 1])


cheers,


Oleg Troyansky

Masters Summit for QlikView - take your QlikView skills to the next level!