Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Any idea why this expression doesn't work?
I feel like the syntax is right but it says it is expecting another '}' somewhere
=sum({$(vYTD)}[Total Revenue])
Still has the little red line underneath } ![]()
'>=' & vCurrentFiscYearStart & '<=' & Date(Today())
vCurrentFiscYearStart is declared in the master calendar but the date is 1/1/2017
'>=' & vCurrentFiscYearStart & '<=' & Date(Today())
vCurrentFiscYearStart is declared in the master calendar but the date is 1/1/2017
May be this:
=Sum({<DateField = {"$(vYTD)"}>}[Total Revenue])
Okay that didnt come up with an error but because im trying to show previous years YTD i wanted to include that too.. So I added it in like this:
=Sum({<FiscalYear = {$(vPriorFiscalYear)}, CalendarDate = {$(vYTD)}>}[Total Revenue])
And now I'm getting this error:
May be use Single colon for Variables. If not use, Double colon
=Sum({<FiscalYear = {'$(vPriorFiscalYear)'}, CalendarDate = {'$(vYTD)'}>} [Total Revenue])
Give this a shot
=Sum({<DateField = {"$(=vYTD)"}>}[Total Revenue])
Please look at the following post to see how to pass parameters to qlikview variables
Declare variables in script:
Let vCurrentFiscYearStart=MakeDate(2017,1,1);
Let vYTD='>=$'&'(=vCurrentFiscYearStart)<=$'&'(=Date(Today(),''DD/MM/YYYY''))';
put
='$(vYTD)' in a text box to see if you get the correct date filter values
Finally
Sum({<CalendarDate = {'$(vYTD)'}>}[Total Revenue])
hth
Sas
Hello Kathryn, good day to you ![]()
From my experience, I know that variables inside expressions will cause such issues when variables are internally defined within variables. Trying using no variables at all. Put everything into a single expression by not using any variables.
If it works then drill further down by creating a variable this time but make sure it doesn't contain any variables, and go down further. Let me know if it helps.
Best regards,
Ambareesh Jonnavittula