Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculate percentage

Hi

i am trying to calculate the percentage for all 4 networks like the table below , to sum all %success rate (10%+10%+33%+0%) and divide it by 4 ( number of networks)

    

CountryNetworkTotal Count SuccessTotal Count%Success
BulgariaA1010010%
BulgariaB2020010%
BulgariaC5015033%
BulgariaD0500%

Thanks.

9 Replies
sunny_talwar

May be like this:

Sum([%Success])/Count(DISTINCT Network)

Not applicable
Author

Hi Sunny

Thank you for you help with this issue ,

i try to use the Formula above , the "Count(DISTINCT Network)" give me the right number for example 3 networks but SUM of %success is not working , i am getting back a long number , the "%Success its something that i build as a variable in the  variable  overview , its seems that the SUM its not working , any idea why  ?

Not applicable
Author

Are you sure you want to sum all percentages. ideally u should avg them..

Not applicable
Author

Hi

i try avg but its the same like sum , looks like the qlikview ignore the function both of them

Gilad

ThornOfCrowns
Specialist II
Specialist II

OP is adding the figures then dividing by 4 to get an average

Not applicable
Author

Hi,

try this

=sum(%Success)/Count(DISTINCT Network)*100&'%'

Not applicable
Author

Hi

first , Thank  you all for your help but i am still having some issues with this.

i'll try to explain , this is what i am getting when i am check %success for each network

Country Network Count Success Total count %Success
BulgariaA4019420.6%
BulgariaBl453208921.7%
BulgariaC10840226.9%

and this is when i remove the network Dimension

Country_AGG Count Success Count Total Count network %Success Avg([%Success]) sum(%Success)/Count(DISTINCT Network_AGG)
Bulgaria6012685322.4%22.4%241.96685288641

and this is what i would like to get - avg of 3 networks 23.1% like you see below , the number below is when i set "total mode" in qlikview UI to Average and i need it as a formula

Country Network Count Success Total count %Success
BulgariaA4019420.6%
BulgariaB453208921.7%
BulgariaC10840226.9%
23.1%

Any idea ??

sunny_talwar

May be like this:

Avg(Aggr(Count(Success)/Count(TotalCount), Country, Network))

Not applicable
Author

Hi,

Find the attachment,

-Joyson G.