Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using variables in expressions and i think i have found a kind of bug.
Example:
i define on script a variable called vSegmento where i define the value of the field [Segmento] that i'll use on the set expression (for a graph)
Sum({<[Segmento] = {$(vSegmento)}>} Measure_to_sum)
Everything works fine when i use
LET vSegmento = 'Segm_1'
but when i change it to
LET vSegmento = 'Segm 1'
(note the "space" character) there is no data on Graph.
Sure, i have the values 'Segm_1' and 'Segm 1' as part of the field Segmento.on data
Is this a bug or i'm doing something wrong?
Hi,
Giving Single quotes fixes the issue. Because of the space between the words is causing the issue. It is a good practice to always give quotes in expression.
=Sum({<[Segmento] = {'$(vSegmento)'}>} Measure_to_sum)
Regards,
Jagan.
Hi,
use $(vSegmento) within single quotes..
Sum({<[Segmento] = {'$(vSegmento)'}>} Measure_to_sum)
Hope it helps
Celambarasan
Hi,
Giving Single quotes fixes the issue. Because of the space between the words is causing the issue. It is a good practice to always give quotes in expression.
=Sum({<[Segmento] = {'$(vSegmento)'}>} Measure_to_sum)
Regards,
Jagan.