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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get the sum of previous months value in qlik sense

Hi All,

how to get the sum of previous months value in qlik sense.


Requirement:  in the master table I have Available Hrs Column and Details table I have Month and Hrs Used

i need the sum of previous months value

Ex: in April I need total of JAN+FEB+MAR of Hrs Used

4 Replies
vinieme12
Champion III
Champion III

Create a MonthNumber field example Jan =1 , feb=2 

and in your expression

Sum({<Year = {2017} , MonthNum = {"=MonthNum<Max(Total MonthNum)"}>}HrsUsed)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Thank you for your reply Vineeth.

I have created field [Month Number] but I am not getting accumulated values

in this example for company 1 system is showing 0 instead of 3.17

Capture.JPG

vinieme12
Champion III
Champion III

please post a sample

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
ahaahaaha
Partner - Master
Partner - Master

Hi,

As an variant, can be as in an attached file?

Regards,

Andrey