Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
=sum({<date={'>=$(=YearStart(today()))<=$(=today())'}>}[budget amount])
what is the wrong in expression ?
i am getting 0 always result here ?
Could you attached your qvw?
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
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
PFA
PLS CORRECT ME
Budget amount for 2015 is 0
u don't have proper data to show results according to ur expression
you need to format year and month (they are number and string) to date format using makedate(year,month)
Thanks a lot
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