Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading expressions into QV from a file

HI All,

I have a ridiculous chart to create 🙂 with hundreds of columns (but will control show / hide via conditional to make it usable).

Entering expression on screen for this volume is a nightmare, so what I want to do is load something like this...

Metrics:
LOAD * INLINE [_MetricCode,_Metric_Name,_MetricExpression
MAA,   Sales    ,sum(SALES)
];

& then have a chart that uses the expression..

=if(_MetricCode='MAA',_MetricExpression)

.. hoping the resulting expression column would be the sum of my sales i.e. £100

... however I am getting the 'text' as a result in the column i.e.  'sum(SALES'.

Is there a way please to tell the expression the result is a formulae ?

Thanks in advance

Nick

1 Solution

Accepted Solutions
sunny_talwar

Try using set analysis instead of if statement:

$(=Only({<_MetricCode = {'MAB'}>}_MetricExpression))

Capture.PNG

View solution in original post

4 Replies
sunny_talwar

May be try it like this:

$(=if(_MetricCode='MAA',_MetricExpression))

Sample:

Capture.PNG

Not applicable
Author

Oops it only works when you have one expression logic - as soon as you have 2 or more it doesn't 😞

Any ideas please ?

Thanks again

Nick

sunny_talwar

Try using set analysis instead of if statement:

$(=Only({<_MetricCode = {'MAB'}>}_MetricExpression))

Capture.PNG

Not applicable
Author

Excellent - thanks again !

Nick