Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I currently have the following expression
sum({$<L4L_Flag_2014={'Y'}>} qty)
which i need to make dynamic using a variable called L4L_Flag
L4L_Flag is set using the follow expression
if(Year=2014,L4L_Flag_2014,L4L_Flag_2013)
How do i replace the L4L_Flag_2014 dimension in the initial expression with the variable L4L_Flag ??
I tried sum({$<$(L4L_Flag)={'Y'}>} qty) but to no avail.
Thanks in advance
Just put '=' in variable declaration.
Define your variable as string like:
L4L_Flag =if(Year=2014, 'L4L_Flag_2014', 'L4L_Flag_2013') // encolsed withing quotes
Hi,
Give single quotes for L4L_Flag_2014 and L4L_Flag_2013 dimensions in variable, so that it is considered as text, instead of Dimension in variable.
if(Year=2014,'L4L_Flag_2014','L4L_Flag_2013')
now in expression try like this
sum({$<$(L4L_Flag)={'Y'}>} qty)
Hope this helps you.
Regards,
Jagan.
Thanks tresesco.
I have tried enclosing the dimension in quotes within the variable and it still does not work.
Thanks tresesco & Jagan.
I have tried enclosing the dimension in quotes within the variable and it still does not work.
You must select a Year and check if it works. Else, try to share your sample qvw.
well as a work around you may create two expression with conditional display.
sum({$<L4L_Flag_2014={'Y'}>} qty) / / conditional display when Year=2014
sum({$<L4L_Flag_2013={'Y'}>} qty) / / conditional display when Year=2013
however it is good to have the variable being used.
Sudeep Mahapatra wrote:
well as a work around you may create two expression with conditional display.
sum({$<L4L_Flag_2014={'Y'}>} qty) / / conditional display when Year=2014
sum({$<L4L_Flag_2013={'Y'}>} qty) / / conditional display when Year=2013
however it is good to have the variable being used.
Thanks.
Unfortunatley i cannot do this as i need to do this update to approx 1000 expressions on 200+ charts
example attached
Just put '=' in variable declaration.