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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis and Growth Calculation

Hi

I have a calculation which is failing and need some help. I am trying to calculate growth using two set analysis values, but its not working.


The set analysis values are below:

Sum({$<[Account]={"40K"}, [Date]={"01/12/2016"}>}[Sales]) .....so lets say this equals $100

Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales]) ......and lets say this equals $90


A normal growth sum looks like Sum(100-90)/90 and this would equal 11.1%


The attempt below fails when I go to divide (Bold) what am I doing wrong?


Sum({$<[Account]={"40K"}, [Date]={"01/12/2016"}>}[Sales])  - Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales]) / Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales])

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

(Sum({$<[Account]={"40K"}, [Date]={"01/12/2016"}>}[Sales])  - Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales])) / Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales])

or this

Sum({$<[Account]={"40K"}, [Date]={"01/12/2016"}>}[Sales])/Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales]) - 1

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

Try this:

(Sum({$<[Account]={"40K"}, [Date]={"01/12/2016"}>}[Sales])  - Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales])) / Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales])

or this

Sum({$<[Account]={"40K"}, [Date]={"01/12/2016"}>}[Sales])/Sum({$<[Account]={"40K"}, [Date]={"01/11/2016"}>}[Sales]) - 1

Not applicable
Author

Thanks Sunny. This worked