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)
Try this
Sum({<Year=,Month=,Date={">=$(=AddYears(MonthStart(max(Date)),-1)) <=$(=AddYears(max(Date),-1))"} >} sales)
Try this
Sum({<Year=,Month=,Date={">=$(=AddYears(MonthStart(max(Date)),-1)) <=$(=AddYears(max(Date),-1))"} >} sales)
@Krish I am using one Text Box for back date purpose. And using one dateTimepicker. if I want pick the any date from datetimepicker1, the text box date value should be previous month last date like 30s or 31st (30-01-2014 or 31-01-2014). how to do it. kindly help me. Advance Thanks & Regards
Can you try the below code
Num(sum({$<Quarter=,Year=,Month=,MonthYr=,Date = {">=$(=monthstart(addmonths(