Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ReddyQsQv
Contributor II
Contributor II

average calculations on straight table

ScoreValues
2004
06
1002
_3
1001
2001
_2
_2

 

200*4+0*6+100*2+100*1+200*1/4+6+2+1+1
this need to be written in expression level

when the score is  '-'  , the values against blank should not consider for the Avg calculation  

please help me in writing the expression for it not in the script level

Labels (4)
3 Replies
cengizeralp
Contributor III
Contributor III

Hi ReddyQsQv,

This expression can be

sum(Score*Values)/Sum({<Score={">=0"}>}Values)

 

regards,

cengiz

ReddyQsQv
Contributor II
Contributor II
Author

Hi Cengiz

Thank you so much for your reply

but in this case when >= 0  it is not considering the 6 when the score is 0

it should not count for the values when it has null not for the 0

 

 

 

 
 

 

Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post, I believe it may fill in some gaps for you:

https://community.qlik.com/t5/Qlik-Design-Blog/Accumulations/ba-p/1466581

Here is the base URL for the Design Blog area in case you wish to do some further searching for other posts in that area, most are how-to related just FYI.

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.