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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nigel987
Creator II
Creator II

Line chart showing monthly values over several years

Hi there,

I have following problem and would appreciate any advice.

I have a line chart which shows the monthly sum of revenues (expression: sum of revenues, dimension: month).

My problem is, that it shows the average values for all months over several years (screen 1 in the attached image).

What I would like to have, is the monthly sum for all months for every year (screen 2 in the attached image).

Examples.png

Any ideas how I could solve this? Thanks for any help.

12 Replies
sunny_talwar

Add Year as your Second dimension and see if that helps.

Misread the requirement::

Try this:

Sum(Aggr(YourExpression, Month))

nigel987
Creator II
Creator II
Author

Hi,

when I add Year as the second dimension, it adds a second line.

I would rather like to have a continuous value. Do you know how i could achieve that?

sunny_talwar

Try this:

Sum(Aggr(YourExpression, Month))

nigel987
Creator II
Creator II
Author

I tried, but it days: na values available in the chart.

I created two textboxes, the first one with

=sum(order_line_price)

This delivers a result.

The second textbox with

=sum(Aggr(order_line_price,Monat))

This delivers the value 0.

sunny_talwar

For second one, try this:

=Sum(Aggr(Sum(order_line_price),Monat))

mphekin12
Specialist
Specialist

Do you have a Month-Year field in your data model?

nigel987
Creator II
Creator II
Author

Hi, I still have the following dimensions: Monat (=Month), Jahr (=Year)

When I now use the expression

=Sum(Aggr(Sum(order_line_price),Monat))


I get the following:

screen.PNG

nigel987
Creator II
Creator II
Author

No. Would it help to add one? How would I create such one out of a date field of the format DD.MM.YYYY?

mphekin12
Specialist
Specialist

You need to load a Month-Year field into your data model.  Try something like:

     Date(Floor(YourDate), 'MM-YYYY') as MonthYear

Use this new MonthYear field as your dimension in the chart you are trying to build.

Hope this helps!