Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sarathi_pm
Contributor II
Contributor II

How to evaluate the expression(which is a text from excel) in the chart


Hi

I am having a excel sheet which has the list of fields and the corresponding expression. I have a list box with the list of the Display_Text,

I have the excel table as shown below.

Display_TextField_NameExp_Col
SalesSalesSum(Sales)
Average SalesSalesAvg(Sales)
Total OrderOrder_cntSum(Order_Cnt)
Employee CountEmp_IDCount(Emp_ID)

When the user selects the Display_Text in the list box, i should be able to dynamically update the chart with the expression that is the Exo_Col.

Is this possible?

Thanks

Sarathi

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try expression:

=$(=Exp_Col)

Update: Extra '=' sign

View solution in original post

5 Replies
tresesco
MVP
MVP

Try expression:

=$(=Exp_Col)

Update: Extra '=' sign

sarathi_pm
Contributor II
Contributor II
Author

Hi Friends,

Creating a variable which holds the Exp_Col value and using the variable as $(Variable_name) solved the problem

Thanks

tresesco
MVP
MVP

With additional '=' sign(as I updated in the earlier post), even that variable would not probably be required.

MK_QSL
MVP
MVP

enclosed

its_anandrjs
Champion III
Champion III

Hi

You can create this way also

Example:-

LOAD * Inline [

Year,Month,Sales,Order_Cnt,Emp_ID

2014,1,434,23,1

2014,2,434,45,2

2014,3,545,542,3

2014,4,656,34,4

2013,4,5654,34,2

2013,5,342,343,3

2013,6,434,43,1  ];

LOAD * Inline  [

Display_Text,    Field_Name,    Exp_Col

Sales,    Sales,    Sum(Sales)

Average Sales,    Sales,    Avg(Sales)

Total Order,    Order_cnt,    Sum(Order_Cnt)

Employee, Count    Emp_ID,    Count(Emp_ID)  ];

And in the chart use

conditional.png

And then write all the expressions as Sum(Sales), Avg(Sales), Sum(Order_Cnt) and Count(Emp_ID)

and then in conditional

=if(GetFieldSelections(Display_Text)='Sales',1,0)

=if(GetFieldSelections(Display_Text)='Average Sales',1,0)

=if(GetFieldSelections(Display_Text)='Total Order',1,0)

=if(GetFieldSelections(Display_Text)='Employee',1,0)

disp.png

Regards

Anand