Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
edwinwitvoet
Contributor III
Contributor III

Cumulative linegraph with multiple dimensions

I want to create a linegraph showing sales per category for multiple years.

Below a screenshot of the datatable and the linegraph

What I try to achieve is

- X-Axis : showing the months

- 3 line graphs with monthly-cumulative ticketsales (tol_quantity) figures

Now the data for the 3 series seems to be mixed in stead of nicely grouped per dimension

ticketorder_per_month_per_year.png

9 Replies
MK_QSL
MVP
MVP

Like this?

edwinwitvoet
Contributor III
Contributor III
Author

Thanks Manish. I am using Qlik Sense. Is it possible for you to share a qlik sense  example / file?

MK_QSL
MVP
MVP

Ok..

Here is the script

Load

  *,

  Year(to_date) as Year,

  Month(to_date) as Month;

LOAD tol_id,

     Date(Date#(to_date,'YYYY-MM-DD')) as to_date,

     event,

     tol_quantity

FROM

(ooxml, embedded labels, table is Sheet1);

Create a Line Chart

Dimension

Month

Year

Expression

rangesum(above(TOTAL sum(tol_quantity),0,rowno(TOTAL)))

edwinwitvoet
Contributor III
Contributor III
Author

Thanks a lot Manish.

After doublechecking, the lines do not show the correct totals

Note I added 'event' as a second dimension

download.png

MK_QSL
MVP
MVP

Kindly close the thread by selecting correct answer..

MK_QSL
MVP
MVP

Provide sample data to work.. I will check and update you.

edwinwitvoet
Contributor III
Contributor III
Author

Hi Manish, please find attached the (qlik sense) app and the data.

The 2 graphs show the problem, being that the data sets over which the totals are calculated should be narrowed down, in order to only use and sum the data of the corresponding event

edwinwitvoet
Contributor III
Contributor III
Author

gwassenaar‌ not sure, but this might be a no-brainer for you to answer. Issue is that the rangesum should be calculated per dimension. It now includes all data within a given set (including data points of another dimension). Appreciate your advice on this one.

Anonymous
Not applicable

Something that was as simple as checking a box in QV is so difficult in QS. Anyone got an answer for how to accumulate over 2 dimensions for this exact post?