Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP
MVP

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

Highlighted
Contributor
Contributor

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

try this?

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