Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last Day of Month in Set Analysis

I have a list of dates and associated values in a stragith table.

I need to show only the value for the last day of the the last month.

If I use monthend(DATE), then I get a sum of all the values rather than just one specific value for that day.

Help?

1 Solution

Accepted Solutions
Not applicable
Author

=MonthEnd(AddMonths('$(vEndDate)', -1))

This worked.

Would anyone know how to incorporate it in set analysis?

Sum({$<DATE ={'$(=MonthEnd(AddMonths('$(vEndDate)', -1))'}>} AMOUNT)

This does not work even though the expression above returns the right date. The end of the set analysis statement is underlined in red but it says that expression is OK.

Am I using it the right way? I would like to only display the sum(amount) for that date.

View solution in original post

3 Replies
Not applicable
Author

Any ideas?

Not applicable
Author

=MonthEnd(AddMonths('$(vEndDate)', -1))

This worked.

Would anyone know how to incorporate it in set analysis?

Sum({$<DATE ={'$(=MonthEnd(AddMonths('$(vEndDate)', -1))'}>} AMOUNT)

This does not work even though the expression above returns the right date. The end of the set analysis statement is underlined in red but it says that expression is OK.

Am I using it the right way? I would like to only display the sum(amount) for that date.

Not applicable
Author

Solved, the above was correct but my DATE and variable return result formats were different. After convertion, worked like a charm