Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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