Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

maylove
New Contributor

Expression in qlik sense

I have this expression: (sum({$<[Place]={"Hospital"},[Type]={"*Actual"}>}[Sales amount]))/(sum({$<[Place]={"Hospital"},[Type]={"*Target"}>}[Sales amount])) but I don't want to SUM them. When I delete the SUM statement, {$<[Place]={"Hospital"},[Type]={"*Actual"}>}[Sales amount]/{$<[Place]={"Hospital"},[Type]={"*Target"}>}[Sales amount] it gives me an error. Any solutions? Thanks
3 Replies
MVP
MVP

Re: Expression in qlik sense

Set analysis could be used only in an aggregation function. If you don't want to sum, try replacing it with Only() 

Highlighted
lweny
New Contributor

Re: Expression in qlik sense

Hi, thanks for responding, it works, cool! I am very new to qlik sense so don't know about this function.. will mark you reply as a solution later, since WiFi is so bad now! thanks
Sameer9585
Contributor II

Re: Expression in qlik sense

try this?

div(sum({$<[Place]={"Hospital"},[Type]={"*Actual"}>}[Sales amount]),sum({$<[Place]={"Hospital"},[Type]={"*Target"}>}[Sales amount]))