Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Sum by Month

I am new to QlikSense Desktop.

I have an Excel-Sheet that contains DATE, AMOUNT, PURPOSE.
I want to create an line chart that sums up the AMOUNT by MONTH.
I do not have any problems creating the chart, but the row will contain every DATE. Any suggestions on how to sum this up?

Thanks in advance,

Andy

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Sum by Month

Let me mention that in addition to everything suggested before, you probably need to calculate Month-Year, not just a month, if your data includes multiple years. In this case, use the following calculation in your load script:

...

Date(MonthStart(DATE), 'MMM-YYYY') as MonthYear,

...

5 Replies
MVP
MVP

Re: Sum by Month

How you are creating MONTH from DATE field?

Use Month(DATE) as MONTH...

oknotsen
Honored Contributor III

Re: Sum by Month

In the load script, add the month field:

load

FieldA,

FieldB,

Date,

month(Date) as Month

from source;

Now you can use Month as a dimension in your chart instead of the Date.

May you live in interesting times!
maverjannet
Valued Contributor

Re: Sum by Month

Try

sum(${<DATE={Month(DATE)}>}AMOUNT)

Employee
Employee

Re: Sum by Month

Hi Mueller,

There are two way you can do this.  You can calculate the months on the fly by using the month function directly in the dimension. 

Or

When you load your data you can precalculate the months.  You do this by using the expression

Month(DATE) as Month

in your load script. Data Load Editor Walkthrough (video) goes through how to us the data load editor.  At 1:56 the video specifically show how to calculate months from a date.

You may also with to review other videos on our New to Qlik Sense Videos area.

Please mark my response as correct or helpful if appropriate so other can find the answer to their questions.

-Josh

Qlik

MVP & Luminary
MVP & Luminary

Re: Sum by Month

Let me mention that in addition to everything suggested before, you probably need to calculate Month-Year, not just a month, if your data includes multiple years. In this case, use the following calculation in your load script:

...

Date(MonthStart(DATE), 'MMM-YYYY') as MonthYear,

...