Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Static Threshold (Maintain static std deviation)

Hi Qlik Community,

Given below data, I'm looking to create the Std Deviation column in the front end and for comparison purposes it should maintains a somewhat constant std deviation for part of the year and update the calculation to next previous 12 months. For instance, Month Year Jan 2016 I was looking at the std deviation from Jan-2015 to Dec 2015. I maintain this threshold until jun-2016. For July 2016, I update my periods to look at jul-2015 to jun 2016. I hold this calculation until the end of the year. I continue this pattern for Jan-2017, when i look at the std deviations for jan-2016 to dec 2016. Hopefully I was able to communicate my ask. Any help is appreciated.

Thanks

V

  

Month YearCountStd Dev
Jan-201545
Feb-201639
Mar-201621
Apr-201664
May-201643
Jun-201622
Jul-201665
Aug-201644
Sep-201641
Oct-201654
Nov-201648
Dec-201625
Jan-201649STDEV.S($B$2:$B$13)
Feb-201639STDEV.S($B$2:$B$13)
Mar-201655STDEV.S($B$2:$B$13)
Apr-201664STDEV.S($B$2:$B$13)
May-201643STDEV.S($B$2:$B$13)
Jun-201622STDEV.S($B$2:$B$13)
Jul-201611STDEV.S($B$8:$B$19)
Aug-201635STDEV.S($B$8:$B$19)
Sep-201641STDEV.S($B$8:$B$19)
Oct-201644STDEV.S($B$8:$B$19)
Nov-201648STDEV.S($B$8:$B$19)
Dec-201625STDEV.S($B$8:$B$19)
3 Replies
sunny_talwar

This?

Capture.PNG

Not applicable
Author

Hi Sunny,

You're pretty close to the answer that i'm looking for. Please note that Jan-2016 std dev is calculating std dev using data from jan-2015 to dec 2015. It hold this # until Jun-2016, when we refresh the threshold. So for Jul-2016 i calculate std dev using data from jul-2015 to jun-2016. Hope thats clear. Please share your formula once you have the right number. Best,

V

  

Month YearCountStd Dev
Jan-201545
Feb-201539
Mar-201521
Apr-201564
May-201543
Jun-201522
Jul-201565
Aug-201544
Sep-201541
Oct-201554
Nov-201548
Dec-201525
Jan-20164914.59425998
Feb-20163914.59425998
Mar-20165514.59425998
Apr-20166414.59425998
May-20164314.59425998
Jun-20162214.59425998
Jul-20161113.30157202
Aug-20163513.30157202
Sep-20164113.30157202
Oct-20164413.30157202
Nov-20164813.30157202
Dec-20162513.30157202
sunny_talwar

Here you go

If(Match(Num(Month(Only({1}MonthYear))), 1, 7) and RowNo() > 12, RangeStdev(Above(Sum({1}Count), 1, 12)), Above(Column(2)))


Capture.PNG