Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

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,

...

View solution in original post

5 Replies
MK_QSL
MVP
MVP

How you are creating MONTH from DATE field?

Use Month(DATE) as MONTH...

oknotsen
Master III
Master III

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!
Anonymous
Not applicable
Author

Try

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

Josh_Good
Employee
Employee

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

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

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,

...