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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
krmvacar
Creator II
Creator II

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 II
Creator II
Author

thank you so much its working