Qlik Community

Community Corner

Discussion board for questions about the Qlik Community, its features, sharing information, general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Prior Month sales in text box

Hi,

I am trying to get sum of sales (prior year same month) in Qlikview, but it doesn't work.

Eg: If I select month as Feb  (year is a separate selection which is 2020) then I should get the sum of sales of 2019 Feb.

Below is the one I tried.

=SUM({< Month= {"$(=Date(AddMonths(Max(Month), -1), 'MMM'))"}>}sales)

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Master III
Master III

Try this

Sum({<Year=,Month=,Date={">=$(=AddYears(MonthStart(max(Date)),-1)) <=$(=AddYears(max(Date),-1))"} >} sales)

View solution in original post

1 Reply
Highlighted
Master III
Master III

Try this

Sum({<Year=,Month=,Date={">=$(=AddYears(MonthStart(max(Date)),-1)) <=$(=AddYears(max(Date),-1))"} >} sales)

View solution in original post