Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
letileti
Contributor III
Contributor III

How to calculate amount last month end - 1

Dear all

I am hoping that someone on this forum can help me with this calculation.

Let's assume my data looks like:

Request Month, Amount

Jan, 100

Feb, 50

..

Sep, 300

Oct, 150

The total Amount until end of Oct = 600.

Now, I want to add a calculation to get the "Amount until end of Sep" = 450.

=> to display the last month end I used: Month (MonthEnd (AddMonths (Today(),-1))) which results in Oct.

=>  then, I try to create a measure that sums the Amount until Month (MonthEnd (AddMonths (Today(),-2))) but didn't succeed.

Anyone who can help me with the correct syntax?

Many thanks in advance!

2 Replies
zebhashmi
Specialist
Specialist

sum({<Request Month = {"< sep"}>}Amount)

letileti
Contributor III
Contributor III
Author

‌thanks for quick reaction!

How to get it dynamic instead of hard coded ?

And shouldn't it be <= instead of <?