Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
Using set analysis, basic example below:
=sum({$ < Year={2007} >} Sales)
However, what I would like to do is instead of having the 2007 as an actual value I would like it to be based
on the value of a variable say called var_year.
I have tried:
=sum({$ < Year={var_year} >} Sales)
and I have tried:
=sum({$ < Year= var_year >} Sales)
But no luck. Any idea on how I can get this to work?
Thanks
Revlin
Hi Revlin,
If the variable as a numeric value like 2009 or 2010 then the following should do
=Sum({< Year = {$(var_year)} >} Sales)
Hope that helps.
Miguel
Hi,
Try like this
=sum({$ < Year={'=$(=var_year)'} >} Sales)
Regards,
jagan.
Hi Jagan
Just tried but no luck.
Hi Revlin,
If the variable as a numeric value like 2009 or 2010 then the following should do
=Sum({< Year = {$(var_year)} >} Sales)
Hope that helps.
Miguel
Try this:
Define your variable,
vSales=sum({$ < Year={$1} >} Sales)
Then use it where you need it,
$(vSales('2007'))
Perfect - that works!
Much appreciated.
Regards
Revlin