Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I feel I'm missing something very obvious here. Can someone please tell me the difference between these two expressions?
This expression returns data:
Count({<MATTER.MATTER_OPEN_YEAR={'2014'}>} MATTER.CLNT_MATT_CODE)
This expression does not. The currentYear variable contains the value '2014', which I have confirmed by displaying the contents in a text box. The expression editor shows no errors.
Count({<MATTER.MATTER_OPEN_YEAR={$(currentYear)}>} MATTER.CLNT_MATT_CODE)
Many thanks, Gavin
well, I would use the equal sign + double quotes. Sth like (but not tested):
Count({<MATTER.MATTER_OPEN_YEAR={“= $(currentYear)”}>} MATTER.CLNT_MATT_CODE)
Fabrice
Hi Gavin,
Try this
Count({<MATTER.MATTER_OPEN_YEAR={"$(currentYear)"}>} MATTER.CLNT_MATT_CODE)
At first verify with a text object that your variable really contains the correct value, then is so, try
Count({<MATTER.MATTER_OPEN_YEAR={'$(currentYear)'}>} MATTER.CLNT_MATT_CODE)
Just add ' because expressions are equal
Hope this is helpfull
Alexandros
Thank you both for the answers. Unfortunately no luck.
I have verified via text box that the variable contains '2014'. (That variable was itself derived from another variable using Left(currentPeriod, 4), where the currentPeriod is '201410'...so there isn't much scope for error...).
Hey Gavin,
Please check out the attached file. Hope it helps. I created a variable and used it in the Set Analysis similar to what you are doing.
Thanks
AJ
Gavin,
OK your variable contains 2014.
But did you add the quotes ? if the basic syntax, without any variable is '2014' you must do '$(variable)' => put quotes
Fabrice
Gavin,
Can you upload your application? As Ajay Prabhakaran examples shows, you can use variable without quotes, and it works also with single and with double quotes. The problem is somewhere else... Maybe you misspell the variable? It is case sensitive.
Regards,
Michael
Thank you Ajay - That looks like an accurate representation of what I'm trying to do...but my file seems to behave differently. My QV file is too large to attach, but I will attach screenshots to a later post below.
Gavin
Hi Aunez - I have tried adding quotes but have the same problem, i.e.
This works: Count({<MATTER.MATTER_OPEN_YEAR={'2014'}>} MATTER.CLNT_MATT_CODE)
This does not: Count({<MATTER.MATTER_OPEN_YEAR={'$(currentYear)'}>} MATTER.CLNT_MATT_CODE)
Thanks, Gavin
Can you try this:
Add a new expression and write : if($(currentYear)=2014, 'Y', 'N')
Let me know what returns this expression
I expect Y....