Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dezmundw15
Contributor III
Contributor III

Calculate a percentage

I am new to Qlik Sense and I am trying to calculate an allocation percentage.  I am using Qlik Sense and I am utilizing a table.  I have the following column and rows

ProviderFacilityPatients Seen by ClinicPatients Seen by %
Totals200
JennyClinic 1 50
MaryClinic 3100
SuzieClinic 450

I would like to calculate the Patients Seen by Clinic/Provider or 50/200.  I am confused with the Aggr functions and the overall structure of the syntax

Sum(Provider)/ Sum(Patients Seen by Clinic should give me a % across the distribution of patients seen in the clinics...but I am getting nothing.  Can someone help me.

Thanks,

Desmond 

22 Replies
sunny_talwar

May be this

Sum(Provider)/Sum(TOTAL Provider)

dezmundw15
Contributor III
Contributor III
Author

Sunny,

Thanks for getting back to my ask...I tried that very same function and it come back with nothing ( - ).  I think it has something to do with the Qlik table calculating the "Patients Seen by Clinic"column is summarized based on the Provider column.  In the Data Section under Column (Provider) the function is calculating as =[Provider].  The summarized results is based on this column. 

I have received results calculating the %, but it would read as follows: 200000%, 50000%, 100000% and so on. 

dezmundw15
Contributor III
Contributor III
Author

Sunny,

I have used the following as well, and I just get 0% for everything

sum([PROVIDER])/textcount([PROVIDER])

sunny_talwar

Would you be able to share a sample or an image to show what you have?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Sunny,

I think you meant:

Dimensions:

Provider

Facility

Measure:

Sum([Patients seen by Clinic] / Sum(TOTAL [Patients seen by Clinic]


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

sunny_talwar

Yes you are right

pradosh_thakur
Master II
Master II

may be something like this

Sum([Patients seen by Clinic] / Sum(TOTAL [Patients seen by Clinic]) 


please check your field name as this may contain  extra space .


or

Sum([Patients seen by Clinic] / Sum({1} [Patients seen by Clinic]) 

regards

Pradosh

Learning never stops.
dezmundw15
Contributor III
Contributor III
Author

Sunny here is a screen shot

SnipItDoc.PNG

sunny_talwar

Did you try with Rob's expression

Sum([Patients seen by Clinic] / Sum(TOTAL [Patients seen by Clinic])