Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using variables in expression of Pie Chart

HI everyone,

I have made a Pie Chart displaying avg(salary)

i have made three buttons 'Avg' , 'Min' , "Max' which set variable 'vSet' as 'Avg' 'Min' & 'Max' accordingly.

i want the expression to b written as vSet(salary) but it throws error i also tried =$(vSet(salary))

how to write it proper way.

any suggestions will b very helpful

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Create one more variable vExpression = vSet & '(salary)'

Now in expression editor you can use

=$(vExpression)

Hope this helps you.

Regards,

Jagan.

View solution in original post

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Create one more variable vExpression = vSet & '(salary)'

Now in expression editor you can use

=$(vExpression)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

i tried as you said but Instead of evaluating it shows me 'min(salary)' as output.

it dosen't  shows the value it shows characters i.e min(salary)

sunny_talwar

Is this what you want? PFA

Update: Expression used $(vSet)(salary) or ($(vSet)(Data) in my case)

Best,

S

jagan
Luminary Alumni
Luminary Alumni

Hi,

Did you given = in variable declaration for vExpression ?  You have give = like below

vExpression                    =vSet & '(salary)'

Then it works, I think you missed it.

Regards,

Jagan.

Not applicable
Author

Thank you.