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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
diana_ritere
Contributor
Contributor

Calculation based on where clause

Hi,

 

I've got one dimension named Stage. Stage may contain values Working, Idle, Cancelled.

I'd like to select only those values which are Working and then calculate drop off rate, e.g.,

([Idle]-[Working])/[Working]

Obviosly this won't work as mine are fields not dimensions.

If I use

match( str, expr1 [ , expr2,...exprN ])

I am unsure on how the expression should be written.

 

Any help?

Labels (6)
1 Reply
justISO
Specialist
Specialist

Hi, not sure where you prefer to do your calculation, in load script or report level, but in report level you can try to use set analysis approach, something like this:

( sum({$<Stage='Idle'>} your_value) - sum({$<Stage='Working'>} your_value) ) / sum({$<Stage='Working'>} your_value)