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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
cristianj23a
Partner - Creator III
Partner - Creator III

Grouping in set analysis and dispersing values in per dimension

Hi Guys.

I have a simple table where the overtime hours that are grouped by the Payroll are evaluated.

Captura.PNG


I'm trying to get the total sum of overtime per payroll. Example:

Field CC_NÓMINA = 'HORAS EXTRAS 25%' has a total of 32 extra hours. This value has to be repeated in the rows that have

'HORAS EXTRAS 25%', just like the COST_PEN_TEST column.

I am trying to do in script because it is more optimized, if not it can be in set analisys, but I would like in Script.

Please help me with this topic.

attached qvw

Greetings. !

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
1 Solution

Accepted Solutions
sunny_talwar

May be try this

Sum(TOTAL <CC_NÓMINA_DESC> Aggr(Sum(DISTINCT {<CC_NÓMINA={'9066','9088','9067','9089'}>} H.EXTRAS),PERIODO,CC.SEDE,FECHA,[N° PERSONAL_CC],CC_NÓMINA_DESC))

or

Sum({<CC_NÓMINA_DESC>}Aggr(NODISTINCT Sum(Aggr(Sum(DISTINCT {<CC_NÓMINA={'9066','9088','9067','9089'}>} H.EXTRAS)

,PERIODO,CC.SEDE,FECHA,[N° PERSONAL_CC],CC_NÓMINA_DESC)),CC_NÓMINA_DESC))

View solution in original post

3 Replies
olivierrobin
Specialist III
Specialist III

hello

create a first table  with the key and the sum

load your table

left join the 1st one on key and you will have your value on each row

cristianj23a
Partner - Creator III
Partner - Creator III
Author

Hi,Olivier.

I also take that step but it does not show me the total, only the sums.

SET_H.EXTRAS:

LOAD

LLAVE_NOM,

Sum(DISTINCT H.EXTRAS)  AS TH.EXTRAS

Resident TABLE_H.EXTRAS Group By  LLAVE_NOM;

Captura.PNG

Greetings..

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
sunny_talwar

May be try this

Sum(TOTAL <CC_NÓMINA_DESC> Aggr(Sum(DISTINCT {<CC_NÓMINA={'9066','9088','9067','9089'}>} H.EXTRAS),PERIODO,CC.SEDE,FECHA,[N° PERSONAL_CC],CC_NÓMINA_DESC))

or

Sum({<CC_NÓMINA_DESC>}Aggr(NODISTINCT Sum(Aggr(Sum(DISTINCT {<CC_NÓMINA={'9066','9088','9067','9089'}>} H.EXTRAS)

,PERIODO,CC.SEDE,FECHA,[N° PERSONAL_CC],CC_NÓMINA_DESC)),CC_NÓMINA_DESC))