I wanted to pass a field name into expression to make the expression dynamic. The field name is in a listbox filled by inline code. So far, no success.
Here is the example. The field name is Readmit14 and Count(Readmit14) returns 15. When I pass the field name (%Metrics) using the list box which only allows single selection, result is 1 even the field name selected is Readmit14. Count(%Metrics)=1. How can I do it?
Thanks
Longmatch
Hi,
Have a look at the attached example.
Regards,
Kaushik Solanki
Hi,
You can write below expression in Chart expression tab,in conditional expression:
-For Readmit14: SubStringCount(Concat(Exp,'|'),'Readmit14')
Similarly
-For %Metrics: SubStringCount(Concat(Exp,'|'),'%Metrics')
-Here Exp is filed name to be cretaed by Inline.
-It contains all values of expression name you need to display in chart i.e. Readmit14,%Metrics .... so on.
-calculate the expressions as per there original Kpi fields.
-By using above expressions intially table will show all expressions.
-On selecting particular expression from Exp listbox it will show only that expression in the chart.
Regards,
Udit
Hi,
Have a look at the attached example.
Regards,
Kaushik Solanki
I used your method still cannot get it to work. Here are the inline code I used: there is only one column in your sample, but my project has 3. I created a variable (Metrics), make it equal to %Metrics and used $(Metrics) in expression. not working.
LOAD * INLINE [
%Metrics, %Intervention, %Fuallname
CXR, Intervention, Chest x-ray
OrderSet, OrderSetIntervention, Order set utilization
IPOrderSet, OrderSetIntervention, IP Order set utilization
ECOrderSet, OrderSetIntervention, EC Order set utilization
Readmit31, OrderSetIntervention, 31 day Readmission
Readmit14, OrderSetIntervention, 14 day Readmission
Readmit7, OrderSetIntervention, 7 day Readmission
];
Hi,
Did u put '=' sign in your variable? It is important
Regards,
Kaushik Solanki