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: 
oxiofrt
Partner - Creator
Partner - Creator

How to agregate data simply ?

Hi,

I am able to calculate an indicator on the finest level of the information available : CODE_CENTRE, DT, HOUR.

But I am not able to agregate this indicator at different higher levels :
- CODE_CENTRE + DT
- CODE_CENTRE + MONTH
- CODE_CENTRE

The possibility to include / exclude TYPE_GARDE should be always available.

The application herejoined is detailing the matter.

Thanks a lot four your help.

3 Replies
oxiofrt
Partner - Creator
Partner - Creator
Author

Nobody can help ? Sad

Anonymous
Not applicable

Hi,

If you look at CODE_CENTRE + DT for example 10/01/08 you have 24 values for NB_AGENTS_MIN so QlikView doesn't know what to show, one of the 13 8:s or one of the 11 9:s. Since there are several possible values you need to use an aggregation function to show what you want. I'm not sure if you want to show 8, 9 or an average of the two but you can use either:

min(NB_AGENTS_MIN)

or

max(NB_AGENTS_MIN)

or

avg(NB_AGENTS_MIN)

//jsn

oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks for your answer.

You are right, everything is a matter of aggregation. I have read once again my post and what is defined within the application is by far more accurate (under the "summary" table).

It's easier to understand going from right to left, from the lowest level to the highest, from "Missing number of hours (-)" to "Number of days (-)".

"Missing number of hours (-)" consists in analyzing each hour of each day and comparing if the real number of persons (sum(NB_AGENTS)) is inferior to the theorical number of persons (NB_AGENTS_MIN which may vary from one hour to another as you have noticed) .
For each hour, I count one for each number of person below the required level. If two persons are missing, I would count 2 and so on. The sum of this indicator is compared with the theorical total number of human hours that should have been done.

"Number of hours (-) " consists in analyzing each hour of each day and comparing if the real number of persons (sum(NB_AGENTS)) is inferior to the theorical number of persons (NB_AGENTS_MIN which may vary from one hour to another as you have noticed) .
For each hour, I count only one whenever on or several person are missing. I count 0 if the required number of people is reached or higher

"Number of days (-) " consists in analyzing each hour of each day and comparing if the real number of persons (sum(NB_AGENTS)) is inferior to the theorical number of persons (NB_AGENTS_MIN which may vary from one hour to another as you have noticed) at least one hour in the day .
If so I count 1 for the whole day, if not I count 0. It doesn't take into account if only one or several person are missing or if it occurs the whole day or only one hour.

I'm still trying to get it but I may not have understood deeply how aggregation really works 😞

Thanks a lot if you can help