Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

Dynamic Expression Change in Straight Table

Hi All

1.jpg

This is my data in excel file.

i created a straight table like below

2.jpg

i want to change my 2 columns in the table dynamically to BudgetSales and Budget Revenue by using a list box in UI,like

Act.jpg

Bgt.jpg

i had done dis script in Edit script

LOAD * INLINE [

    Filter, FilterNo

    Actual, 1

    Budget, 2

];

but while changing expresions in chart

im not getting the result

some thing is wrong in my expression like

=if(GetCurrentSelections ('Budget'), Sum ([ActSales]),Sum ([BudgetSales]))

pls give me the ideas

1 Solution

Accepted Solutions
cjohnson
Contributor II

Re: Dynamic Expression Change in Straight Table

Hi Ramya,

Set a variable in your script as follows:

selection1.png

Then use the following as a show conditional in your expression:

selection3.png

selection2.png

Let me know if you have any other questions.

Thanks,

Camile

4 Replies
cjohnson
Contributor II

Re: Dynamic Expression Change in Straight Table

Try using variables instead. I'll try to create an example, but the concept is similar:

You would have two expressions (one for ActualSales and one for BudgetSales). You would use the conditional property to determine if the expression should get calculated:

conditional.png

This would be based on your variable - which is determined by the list box you have above (using the GetFieldSelections function you described).

Thanks,

Camile

cjohnson
Contributor II

Re: Dynamic Expression Change in Straight Table

Please see attached for more details.

Thanks,

Camile

Not applicable

Re: Dynamic Expression Change in Straight Table

Hi camile,

Im not able to open that qvw file..

Will u pls provide me the screenshots or

Expressions of wat u did in dat qvw file..

It will be more helpful to me..

Thanks

Ramya

cjohnson
Contributor II

Re: Dynamic Expression Change in Straight Table

Hi Ramya,

Set a variable in your script as follows:

selection1.png

Then use the following as a show conditional in your expression:

selection3.png

selection2.png

Let me know if you have any other questions.

Thanks,

Camile

Community Browser