# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for
Did you mean:
Not applicable

## percentage calculation (do i have to use set analysis?)

Hi everybody.

I have to make a percentage calculation above the total. For example i have a lot of Quantitys

Quantitys

100

250

300

500

100

And i have to make the % of this quantitys above the total ( 100/1250) (250/1250 etc..)

What formula should i use? I guess it may be set analysis

Thank you all

Greetings.

1 Solution

Accepted Solutions
Partner

With Quantitys as your dimension in a chart, you can use

Sum(Quantitys)/Sum(TOTAL Quantitys)

12 Replies
Specialist

Hi,

Check the 'relative' box in Expressions tab in the object properties.

Marc.

Partner

With Quantitys as your dimension in a chart, you can use

Sum(Quantitys)/Sum(TOTAL Quantitys)

Not applicable
Author

Hi piet,

i have small doubt here

if we go with sum(quanitys)  it counts total all only that 100

Not applicable
Author

Sory i didnt understand this, what do yo mean?

I put this expression and it´s working. Also, i selected the % option in number presentation.

Not applicable
Author

I dont know if somebody is going to read this but..

I did this well but now im having problems with another expression similar to this.

I have to do percentage above the total of this

I guess it would be something like this

But it´s not working

Thank you.

Not applicable
Author

try  like this

Partner

Try

Not applicable
Author

Ok thank you!!

What´s the difference between that and this ?

Partner

The syntax is:

sum([{set_expression}][distinct][total[<fld {, fld}>]] expression)

Returns the aggregated sum of expression or field iterated over the chart dimension(s).

Examples:

sum(Sales)

sum(Price*Quantity)

sum(distinct Price)

sum(Sales)/sum(total Sales) returns the share within the selection

sum(Sales)/sum(total <Month> Sales) returns the share within the selection for each Month

sum(Sales)/sum(total <Month,Grp> Sales) returns the share within the selection for each Month and Grp