Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Advance aggregation for Line chart in QlikView

Hi there,

  For example i have a flat table of country, salary.

  Then out of this, i created the following.

   Country       Min            Median           Max

    SG            100              300               450

    USA           50               100               300

    UK             150             300                500

  In this table, there is country dimension and in the expression, i have 3 individual calculations for Min, Median and Max.

I need to display them through a line chart where each country will be represented with 1 line with 3 data points representing Min(Salary), Median(salary) and Max(Salary).

Seems simple but a bit tricky. Really appreciate your help.

Thanks.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Something like below?

Data:

Load * Inline

[

  Country, Sales

  A, 100

  A, 120

  A, 300

  A, 400

  B, 200

  B, 220

  B, 120

  B, 150

  C, 400

  C, 200

  C, 150

  C, 300

];

Load * Inline

[

  Dim

  Min

  Medium

  Max

]

Create a Line Chart

Dimension

Dim

Country

Expression

IF(Dim = 'Min', Min(Sales),

IF(Dim = 'Medium', Median(Sales),

IF(Dim = 'Max', Max(Sales))))

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Something like below?

Data:

Load * Inline

[

  Country, Sales

  A, 100

  A, 120

  A, 300

  A, 400

  B, 200

  B, 220

  B, 120

  B, 150

  C, 400

  C, 200

  C, 150

  C, 300

];

Load * Inline

[

  Dim

  Min

  Medium

  Max

]

Create a Line Chart

Dimension

Dim

Country

Expression

IF(Dim = 'Min', Min(Sales),

IF(Dim = 'Medium', Median(Sales),

IF(Dim = 'Max', Max(Sales))))

ahaahaaha
Partner - Master
Partner - Master

ЗДРАВСТВУЙ,

смотрите прикрепленный файл.

С Уважением,

Андрей

Anonymous
Not applicable
Author

THANK YOU SO MUCH SIR!!!!!!

EXACTLY WHAT I NEED!!! Bless you