Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a variable declared in the variable overview tab.
varQuarter1 = $(varReportYear)&'-Q1'
where varReportYear is another variable which is set based on a selection from the list box.
I need to use the variable varQuarter1 inside a set analysis expression..
Expression : Sum(Total {<DateYearQuarter={"$(=varQuarter1)"}>}AdjNOI)
This expression in set analysis is not giving the correct result.. When I hard code a value for varQuarter1 ,its gives me correct result.
Sum(Total {<DateYearQuarter={'2014-Q1'}>}AdjNOI) -- This works fine.
I checked the variables varReportYear,varQuarter1 and both are returning correct values.
Can anyone please help me how to use this variable correctly in setanalysis .
Thanks
Nirmal.
Try
Sum(Total {<DateYearQuarter={'$(varQuarter1)'}>}AdjNOI)
Your variable is text not an integer,so needs to be enclosed in single quotes to be interpreted correctly.
Can you try if this works?
Sum(Total {<DateYearQuarter={$(varQuarter1)}>}AdjNOI)
Thanks for your quick reply.
Unfortunately its not working .
it give the below error.
Error: Error in set modifier ad hoc element list:
',' or ')' expected
Could you attach a sample QVW?
Just create those two variables and the expression that you have tried so that I can understand where exactly the pblm is
Try
Sum(Total {<DateYearQuarter={'$(varQuarter1)'}>}AdjNOI)
Your variable is text not an integer,so needs to be enclosed in single quotes to be interpreted correctly.
Thanks for your reply Colin..
It doesn't work
Add a text box with. =$(varQuarter1) as the expression, and add a listbox on the DateYearQuarter field.
This should show any differences in the field data and variable data.
Can you try this?
=Sum({<DateYearQuarter={$('varQuarter1')}>}AdjNOI)
I guess this should work.
or make a str table with your expression and with an empty label
hover the mouse on the label and watch your expression in the popup