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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use an If or When condition in a Variable


Hi,

I need to make a change to an existing variable so that it only shows results for when 'Status' is 'Active'.

This is the variable: sum([Counter_Interviews])/(count(distinct [Fin Period])*4)/count(distinct Planner)

At the moment this formula taking all interviews, dividing them by 4 and then dividing them again by the number of planners. What I want it do to is to only take interviews for planners who have an 'Active' status, divide this by 4, and then divide this by the number of planners with an 'active' status.

Any suggestions?

Thanks

1 Reply
Sokkorn
Master
Master

Hi,

Maybe you can try this

(Sum({$<Status={'Active'}>} [Counter_Interviews])/4)/

Count({$<Status={'Active'}>} Distinct Planner)

Regards,

Sokkorn