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

Help with expression

I am new to Qlik and trying to write an expression that I can create easily in other BI tools, but don't know Qlik language yet. I have a large data set where I only want to use specific values in a calculation.

One of the columns in the data set is [metric value]

I only want to display the metric values for rows that have a specific metric name.

For example: Show [metric value] where [metric name] = 'Production'

any thoughts?

4 Replies
sunny_talwar

Are you trying to restrict this in the script? Only load data where metric name = Production?

LOAD FieldName....

FROM ...

WHERE [metric name] = 'Production';

If you want to bring in all data and want to show Production data in chart, you have two options

1) Use calculated dimension

If([metric name] = 'Production', DimensionName)

and then check 'Suppress When Value Is Null' on the dimension tab

2) Use set analysis

Lets say you have an expression like this Sum(Measure), you can restrict it using set analysis like this

Sum({<[metric name] = {'Production'}>} Measure)

rupamjyotidas
Specialist
Specialist

Do Read on SET ANALYSIS

sum( {$<[metric name]= {Production}>} [metric value])

Not applicable
Author

thanks, that got it working like i wanted

rupamjyotidas
Specialist
Specialist

Please close the discussion