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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis?

=sum({<date={'>=$(=YearStart(today()))<=$(=today())'}>}[budget amount])

what is the wrong in expression ?

i am getting   0   always result here ?

1 Solution

Accepted Solutions
sunny_talwar

Budget amount for 2015 is 0

View solution in original post

9 Replies
robert_mika
Master III
Master III

Could you attached your qvw?

hic
Former Employee
Former Employee

It could be that your YearStart() and Today() return strings, so that you need to enclose then in single quotes. Further, you need to enclose the search string in double quotes. Hence, try

     =sum({<date={">='$(=YearStart(today()))'<='$(=today())'"}>}[budget amount])


HIC

sunny_talwar

May be try this:

Create a variable

vRange = '>=' & Date(YearStart(Today()), 'yourDateFormat') & '<=' & Date(Today(), 'yourDateFormat') (try saving the variable without the = sign, if it doesn't work then try it with the = sign)


=Sum({<date={'$(vRange)'}>}[budget amount])



Let me know if that solved your problem

Best,

Sunny

Anonymous
Not applicable
Author

PFA

PLS CORRECT ME

sunny_talwar

Budget amount for 2015 is 0

buzzy996
Master II
Master II

u don't have proper data to show results according to ur expression

Anonymous
Not applicable
Author

you need to format year and month (they are number and string) to date format using makedate(year,month)

Anonymous
Not applicable
Author

Thanks a lot

sunny_talwar

Thanks? Did that solve your problem? I thought that was your sample data and you will update the sample data to test the expression.

If missing data was the issue, then I guess we know why your expression wasn't working

Best,

Sunny