Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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

Try this then

Num(Sum({$<[calendar date] = {"$(='>=' & Date(AddYears(Today(), -1), 'DD/MM/YYYY') & '<=' & Date(AddYears(Today(), 0), 'DD/MM/YYYY'))}>} recharge_amount),'# ##0'))

master_student
Creator III
Creator III
Author

there is an error on the express

Capture.PNG

=Num(Sum({$<[Calendar date] = {"$(='>=' & Date(AddYears(Today(), -1), 'DD/MM/YYYY') & '<=' & Date(AddYears(Today(), 0), 'DD/MM/YYYY'))}>} recharge_amount),'# ##0'))

swuehl
MVP
MVP

There is a double quote missing:

=Num(Sum({$<[Calendar date] = {"$(='>=' & Date(AddYears(Today(), -1), 'DD/MM/YYYY') & '<=' & Date(AddYears(Today(), 0), 'DD/MM/YYYY')) " }>} recharge_amount),'# ##0'))

mostwanted123
Creator
Creator

Remove the last bracket

master_student
Creator III
Creator III
Author

thanks but i need the value between, 01/01/2016 and 20/10/2016

it seems that the result between 20/10/2016 and 20/10/2017

swuehl
MVP
MVP

Just adapt the dates in your search:

=Num(Sum({$<[Calendar date] = {"$(='>=' & Date(Yearstart(Today(), -1), 'DD/MM/YYYY') & '<=' & Date(AddYears(Today(), -1), 'DD/MM/YYYY')) " }>} recharge_amount),'# ##0')

Anil_Babu_Samineni

Try this?

=Num(Sum({$<[Calendar date] = {"$(='>=' & YearStart(Date(AddYears(Today(), -1), 'DD/MM/YYYY')) & '<=' & Date(AddYears(Today(), -1), 'DD/MM/YYYY') " }>} 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

Try this

Num(Sum({$<[calendar date] = {"=[calendar date] >= SetDateYear(YearStart(Today()), Year(Today())) and [calendar date] <= SetDateYear(Today(), Year(Today()))"}, [Year of Date] = {">=$(=Max([Year of date])-1)"}>} recharge_amount),'# ##0'))