Discussion board where members can get started with Qlik Sense.
I am using below functions to fetch current year and current month less one month but I am getting data for all years.
Although month is as expected by me.
let vCurrentMonthYear = '=year(addmonths(max(BillDate),1))';
let vPriorMonth = '=month(addmonths(max(BillDate),-1))';
Thanks and Regards,
Let vReportFromDate = YearStart(Date(BillDate));
Let vReportDate = Date(AddMonths(Date(BillDate),-1))
then put on the load script..
Where BillDate>= '$(vReportFromDate)' and BillDate<= '$(vReportDate)'
Where BillDate>= YearStart(Date(BillDate)) and BillDate<= Date(AddMonths(Date(BillDate),-1))
Thanks for your response but I am still not getting current year.
check the date format it wil work or share the sample code
Are you trying to solve this in front end or load script?
If it is in front-end then share your current set analysis and someone will help write the expression. Nasir has already set you in the right direction.
Thanks for your response. Actually, I am trying this in load script and I do not want user to update script every time to fetch current year and current month -1 data from SQL.