Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

monthly AVG deviations

Hi all,

In my model I have values for employee per month.

In a table with Employee, Month as dims I want to add two new expressions:

  • monthly average 
  • monthly average deviations 

i/e 

employee 

month

value

monthly AVG

deviations 

A

Jan

45

48.7

92%

A

Feb

52

48.7

107%

A

Mar

38

48.7

78%

A

Apr

60

48.7

123%

 

Any ideas?

 

Labels (2)
1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

script:

LOAD * INLINE [
employee , month, value
A, Jan, 45
A, Feb, 52
A, Mar, 38
A, Apr, 60
];

 

Straight Table:

dim1:       employee

dim2:       month

expr1:      sum(value)

expr2:     avg(TOTAL value)

expr3:      sum(value)/ avg(TOTAL value)

View solution in original post

2 Replies
Frank_Hartmann
Master II
Master II

script:

LOAD * INLINE [
employee , month, value
A, Jan, 45
A, Feb, 52
A, Mar, 38
A, Apr, 60
];

 

Straight Table:

dim1:       employee

dim2:       month

expr1:      sum(value)

expr2:     avg(TOTAL value)

expr3:      sum(value)/ avg(TOTAL value)

Brett_Bleess
Former Employee
Former Employee

If Frank's post got you what you needed, please be sure to close out your thread by using the Accept as Solution button on his post to do so.  This will give him credit for the help and let other Members know it worked.  If you did something different, you can post that and then mark it, and if you still need further assistance, please leave an update post.

One place you can use to help with these situations is the Design Blog area of the Community, there are 700 plus mostly how-to posts there that you will likely find helpful in giving you ideas on how to go about things.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.