Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to plot a line chart with Multiple Y Axis values for the same X-Axis Value

Hi,

I have a requirement where I have to plot multiple values on Y Axis for a single X Axis value. This is for a line chart. Please let me know how is this possible ? If not possible by line chart then what other chart I should use ?

I am attaching the sample data too.

I will really appreciate your help.

Regards

Ajay

18 Replies
MarcoWedel

Uncheck "Force Zero" on axis tab.

Regards

Marco

swuehl
MVP
MVP

Another option might be a scatter chart

LOAD Date#(BEAM_Arcrate_Arccounter.date) as BEAM_Arcrate_Arccounter.date,

  RowNo() as RowID,

  1 as ID,

     BEAM_Arcrate_Arccounter.cumulative_arc_rate

FROM

(biff, embedded labels, table is Sheet1$);

Dimensions:

RowID

ID

Expressions:

=Sum (BEAM_Arcrate_Arccounter.date)

=Sum ([BEAM_Arcrate_Arccounter.cumulative_arc_rate])

Choose Lines&Symbols representation on presentation tab

Scatterchart.png

Not applicable
Author

Thanks Marco,

I am almost there. But it is showing in reverse order .

And if I sort descending then it shows like this

Not applicable
Author

Thanks Swuehl,

I will give it a shot .

Not applicable
Author

Thanks Stefan,

I get a single line and the dates don't make any sense. I am doing something wrong because you are clearly able to get the chart.

I am attaching screenshots of other settings too.

Anonymous
Not applicable
Author

Hi Ajay,

Here is another way to plot all the values, add both fields as dimensions, this will plot by date and keep separated all the data points:

foto.png

Next in your expression, add the sum of all cumulative_arc_rate:

foto.png

In axis tab select contiguous

foto.png

And in number select Date format for Continuous X-axis

foto.png

This will produce the following output:

foto.png

Regards,

-- Karla

Not applicable
Author

Hi Marco,

I was missing the setting "Continuous" . Once I checked it I got the chart :-).

Thanks a lot for all your help.

Appreciate it.

Ajay

Not applicable
Author

Thanks Karla Appreciate it. I will try that option too.

swuehl
MVP
MVP

Just a follow up to the scatter chart:

You need to take care that your dates are interpreted as such, having a numeric representation.

Your Excel file shows text values, AFAIR.

That's why I've used

LOAD Date#(BEAM_Arcrate_Arccounter.date) as BEAM_Arcrate_Arccounter.date,

in my LOAD script (or using your format code:

LOAD Date#(BEAM_Arcrate_Arccounter.date,'YYYY-MM-DD') as BEAM_Arcrate_Arccounter.date,

I assume that's your issue.

See also:

Why don’t my dates work?

Get the Dates Right