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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
27 Replies
sunny_talwar
MVP
MVP

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
Champion III
Champion III

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
Champion III
Champion III

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
MVP
MVP

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
MVP
MVP

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'))