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: 
francis_gr
Creator
Creator

How to calculate percent values in a pivot table chart

Hi; again

I have done a pivot table to show for each date the number of workers in each work center. I need to calculate for each date and work center, what percentage is the number of workers over the total workers for date without including "Others"

Tengo la siguiente tabla pivotante en la que represento en distintas fechas el numero de personas segun su distribucion por centros. Mi pregunta es como sería la expresion que tengo que incluir para añadir al lado de cada subtotal, el % que representa sobre el total de personas de cada fecha sin incluir a los desplazados

Date North Center West South Others

12-2006 60 14 144 10 39

12-2007 63 14 155 10 43

12-2008 67 13 160 8 44

12-2009 63 15 164 8 43

09-2010 64 16 155 11 39

My expresion to calculate total vaues is:

Sum(If([change]<>'B',1,0))

My dimensions are two

=If(mes='12' or mes=month(FechaInforme),(If(Date(MakeDate(Año,mes),'MM/YYYY')>=Ini_Hco and Date(MakeDate(Año,mes),'MM/YYYY')<=Date(MakeDate(Year(FechaInforme),Month(FechaInforme)),'MM/YYYY'),MESAÑO)))

Where FechaInforme value is 30/09/2010 and Ini_:Hco is 31/12/2006

=WorkCenter

Regards

1 Reply
pover
Partner - Master
Partner - Master

Have you tried the TOTAL keyword?

Something like:

Sum(If([change]<>'B',1,0)) /

Sum(TOTAL <Date> If([change]<>'B' and [Work Center]<>'Others',1,0))

What I don't know is if the Date in the total is going to consider the calculated dimension as it should give you a total for every date.

Regards.