Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
An issue has been identified on Qlik Cloud hub, please visit our Status Update Page for details: GET THE LATEST
cancel
Showing results for 
Search instead for 
Did you mean: 
krmvacar
Creator
Creator

Qliksense cumulative sum by month

Hi All,

As you can see the attached qvf example, there is an operation where I make cumilative sum on barchart.

Let the barchart I want to do here start from april 2021 and show it in april as cumilative before 2021.

In other words, I want my first value to start as 2.15k in April 2021 and not to appear on the barchart before 2021.

I wrote the cumilative formula, but I could not do this operation.

I would be glad if you help.

1 Solution

Accepted Solutions
rbartley
Specialist II
Specialist II

Hi,

You will need to redefine your dimension as follows:

=if(Num(Year(createdate)&Num(Month(createdate),'00'),'0000')<=202104,'2021Apr',Year(createdate)&Month(createdate))

This converts all dates before April 2021 to 2021Apr.

I notice that the sorting of the dimensions in your app was incorrect as it was done alphabetically, so you will also need to change the sort order to use expression:

Num(Year(createdate)&Num(Month(createdate),'00'),'0000')

I have attached the revised app, keeping your original barchart, but adding a table to show the data more clearly and also a corrected barchart.

View solution in original post

2 Replies
rbartley
Specialist II
Specialist II

Hi,

You will need to redefine your dimension as follows:

=if(Num(Year(createdate)&Num(Month(createdate),'00'),'0000')<=202104,'2021Apr',Year(createdate)&Month(createdate))

This converts all dates before April 2021 to 2021Apr.

I notice that the sorting of the dimensions in your app was incorrect as it was done alphabetically, so you will also need to change the sort order to use expression:

Num(Year(createdate)&Num(Month(createdate),'00'),'0000')

I have attached the revised app, keeping your original barchart, but adding a table to show the data more clearly and also a corrected barchart.

krmvacar
Creator
Creator
Author

thank you so much its working