# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
New 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
MVP

## Re: Calculate a percentage

May be this

Sum(Provider)/Sum(TOTAL Provider)

New Contributor III

## Re: Calculate a percentage

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.

New Contributor III

## Re: Calculate a percentage

Sunny,

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

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

MVP

## Re: Calculate a percentage

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

MVP & Luminary

## Re: Calculate a percentage

Sunny,

I think you meant:

Dimensions:

Provider

Facility

Measure:

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

-Rob

http://qlikviewcookbook.com

MVP

## Re: Calculate a percentage

Yes you are right

Honored Contributor II

## Re: Calculate a percentage

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

Learning never stops.
New Contributor III

## Re: Calculate a percentage

Sunny here is a screen shot

MVP

## Re: Calculate a percentage

Did you try with Rob's expression

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