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: 
sweens78
Creator
Creator

Expression for calculating the mean of a number

HI Folks,

 

I have the below expression and I want to get the mean percentage of the number

 

So for example for the % assessed of those presenting it’ll be

 

=(Count(NEWKEYID)-Count(PatientsNotAssessed_ID))/count(Hospital)

So in other words thats 6946/28 which gives me a mean national value of 248 approx.

So to get the mean percentage of the number is it 248/6946 *100 =3.5%??

What would the expression be then?  Any ideas?

4 Replies
sunny_talwar

May be try this

(((Count(NEWKEYID)-Count(PatientsNotAssessed_ID))/count(Hospital))/(Count(NEWKEYID)-Count(PatientsNotAssessed_ID))) * 100

Or Simplify it to this

(1 - (Count(Hospital)/(Count(NEWKEYID)-Count(PatientsNotAssessed_ID)))) * 100

 

sunny_talwar

Or simplify it to this

1/Count(Hospital) * 100
sweens78
Creator
Creator
Author

Thanks Stalwar

I think Im calculating the mean percentage wrong so I have 28 hospitals with 6946 patients.
The mean number for this is 6946/28 =248.

But the mean percentage of this number should be 248/(highest number on that list) which in that case is 861 and I *100.

Is that the way i should be calculating the mean % so 248/861*100 is 28%? ...is that correct?apologies probably basic maths!
sunny_talwar

I am not sure I follow. Can you share a sample to check it out?