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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help Please~How to Calculate Monthly Total in Set Analysis?

Hi Experts,

Thanks for taking time to look at my question.

I was asked to calculate the monthly total quotes(for insurance) based on different areas.  

       First. I was trying to calculate the MTD (Month to Date) total quotes by using the expression as follow, I think it works.

        =sum({<Month = {$(=Month(Today()))}, Year = {$(=Year(Today()))},QuoteDate=>}QuoteCount)

      

       Then, I want to calculate the total quotes for previous two months separately(dynamic month): Dec( from Dec.1.2015--Dec.31.2015) and         last year Novemer,but I don't know how to do it.  The data structure is as follow picture:


J)UKARO}5E0]RHRBJ8O`WOA.png

Can anybody help me with it? Thank you so much.

2 Replies
sunny_talwar

Would you be able to share some data with your expected output? Difficult to understand the requirement without looking at an expected output

luciancotea
Specialist
Specialist

Dec =sum({<Month = {$(=Month(addmonths(Today(), -1)))}, Year = {$(=Year(addmonths(Today(), -1)))},QuoteDate=>}QuoteCount)


Nov =sum({<Month = {$(=Month(addmonths(Today(), -2)))}, Year = {$(=Year(addmonths(Today(), -2)))},QuoteDate=>}QuoteCount)