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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

value 2016 until today

Hello Guys,

How to change this expression bellow so it gives me the value of year -1 until today 20/10

My calendar dimension contains : Calendar Date with that format : 20/10/2017

num(sum( {$<[Year of date]={$(=Max([Year of date])-1)}>} recharge_amount),'# ##0'))

Thanks in advance

27 Replies
sunny_talwar

Is Year of Date a year field or date field?

master_student
Creator III
Creator III
Author

Year field

Anil_Babu_Samineni

This?

num(sum( {$<[Year of date]={">= $(=Max([Year of date])-1) <=$(=Today())"}>} recharge_amount),'# ##0'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

May be this

num(sum( {$<[Year of date]={$(='>=' & (Max([Year of date])-1))}>} recharge_amount),'# ##0'))

sunny_talwar

I am assuming that you won't have future data in your app... if you do, then you will need to use date instead of year field

master_student
Creator III
Creator III
Author

Hello Sunny,

Thanks

whene I use your expression i get this error:

Error: Error in set modifier ad hoc element list:

',' or ')' expected

the year field like this

Capture.PNG

master_student
Creator III
Creator III
Author

your expression give me the total of 2016 and 2017 until today, I need the total of 2016 until 20/10/2016

sunny_talwar

Try this

num(sum( {$<[Year of date]={"$(='>=' & (Max([Year of date])-1))"}>} recharge_amount),'# ##0'))

master_student
Creator III
Creator III
Author

Thanks Sunny, same thing as Anil, your expression give me the total of 2016 and 2017 until today, I need the total of 2016 until 20/10/2016