Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exact day comparison current month vs previous month

Hey guys,

i´m new on clickview and looking for some help. I have the following formulas for Sales:

current month:

=sum({<Year={$(=year(today()))},Month={'$(=upper(Month(today())))'}>}Sales)

previous month:

=sum({$<Jahr = {$(=year(AddMonths(today(),-1)))}, Monat = {$(=month(AddMonths(today(),-1)))}>}Sales)

prior-year month:

=sum({<Jahr={$(=year(today())-1)},Monat={'$(=upper(Month(today())))'}>}Sales)

The problem is, that the formula of the current month calculates the sales to date (21.09.2016) and thus a comparison with the (entire) previous month or the (entire) prior-year month isn't particularly meaningful. Is it possible that the previous month and the prior-year month will be charged only to 21. (current day date; for example: 21.09.2016 = 21.08.2016 or 21.09.2015 ). The result of the formula should not be affected by the current selection.


Best wishes

0 Replies