Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
maylove
Contributor
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
tresesco
MVP
MVP

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

lweny
Contributor II
Contributor II

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
Creator II
Creator II

try this?

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