Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
ecacarva
Contributor II
Contributor II

Calculate percentual of percentuals

I have the following situation:

Captura de tela de 2020-07-07 10-25-44.png

I need to calculate a percentual according number of itens, on this case: (100%+80%+100%)/3 = 93,33%.
Tx de Sucesso = Num(Sum([MET.VL_REAL]) / Sum([MET.VL_PLAN]),'##0,0%')
If I simple divide this total formula by 3 the result is 30%.

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Maye be :

=Num(avg(Realized/Plnanned),'##0,0%')

 

output for 3:

Capture.PNG

 

for 4 values :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

6 Replies
Taoufiq_Zarra

@ecacarva 

and for ?

Num(Avg(aggr(Sum([MET.VL_REAL]) / Sum([MET.VL_PLAN]),VIplan,ViAju, VLreal)),'##0,0%')

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ecacarva
Contributor II
Contributor II
Author

Hello @Taoufiq_Zarra

Does not works yet (Tx S2)

Captura de tela de 2020-07-07 11-01-54.png

Taoufiq_Zarra

Hello @ecacarva 

can you share a sample data ? and the expected result ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ecacarva
Contributor II
Contributor II
Author

The result must be 93,33% that is (100+80+100) / 3.
3 record :
1st reaches 100%
2nd reached 80%
3rd  reached 100%

280%/3=93,33%


If have 4 records then divided to 4

Taoufiq_Zarra

Maye be :

=Num(avg(Realized/Plnanned),'##0,0%')

 

output for 3:

Capture.PNG

 

for 4 values :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

ecacarva
Contributor II
Contributor II
Author

Dear @Taoufiq_Zarra 

It works, I used the field '%META' that was my break on list:

Num(Avg(aggr(Sum([MET.VL_REAL]) / Sum([MET.VL_PLAN]),[%META])),'##0,0%')

Thank you very much !