Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
warrentk80
Creator
Creator

Percentage of Expression

Good morning, I need to calculate in an expression of a table lienare the relationship between the value of a cell and the total of that field.

I'll explain.

I have a table so composed

TYPE; Value
TO ; 50
B; 20
C; 30
D; 50

via set analisys I just have to consider the type of data A B and C whose sum is 100

50 + 20 + 30

what I would like is to have a column with the% of single value for total

in case

TO ; 50; 50%
B; 20; 20%
C; 30; 30%

how to calculate the%

attached sample files based excel data and QVD

grazie 1000

2 Replies
thomaslg_wq
Creator III
Creator III

Use the TOTAL sentence :

Sum({<[Tipo]={'A','B','C'}>}Valore) / Sum(TOTAL {<[Tipo]={'A','B','C'}>}Valore)

vishsaggi
Champion III
Champion III

Try this in your % expression?

= Num((Sum({<Tipo = {'A','B','C'} >} Valore)/ Sum(Total  {<Tipo = {'A','B','C'} >} Valore))*100, '#0.00','.',',') & '%'