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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Standard Deviation Aggregate

Hello,

I am taking the standard deviation of the sum of sales for the hierarchy an item belongs to for each week for a particular store. I am selecting one item and a date range. The standard deviation is based on the sum of sales for the hierarchy (SubClass) for each week outside of my date range.

The following expression gives me the standard deviation for sub class sales outside of the time period but does not include the weeks where the item I selected did not actually sell.

Any help would be greatly appreciated. 

STDEV( Total<Store> {$<[Year Week]=E([Year Week])>}

Aggr(

  Sum(Total<SUB_CLASS,  [Year Week], Store>{$<[Year Week]=E([Year Week]), Item=>}Sales),

  SUB_CLASS, [Year Week], Store))

0 Replies