Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

hugomeuris
New Contributor

Find Max of a time

Hello every one,

I'm facing a problem with Qlik Sence I couldn't manage to fix for now, so I thought I should ask the community for some help =)

What I'm looking for is following :

Everyday (column 2) I get a working time (column 4) for each line of production (column 3)

I would like to add a column thank to set analysis, which would give me the maximum of working time between the 2 lines of production.

(like shown on the picture)

Question Qlik.jpg

I tried to use the Max() function but I can't use it on the operator SUM => Max(Sum(TPSPASSE)) doesn't worked.

By looking through some docs and posts I got that I had to use Aggr(), but all I tried doesn't work...

Has please someone an idea what I should write in set analysis to get the wanted column ?

Thank for your time and consideration

Tags (2)
1 Solution

Accepted Solutions

Re: Find Max of a time

Is your field name called Ligne or PFC_Ligne de conditionnement??

You just need to use the exact field names to get it to work

Max(TOTAL <PFC_Jour, JOUR_PRODUCTION> Aggr(Sum(TPSPASSE),  PFC_Jour, JOUR_PRODUCTION, [PFC_Ligne de conditionnement]))

Similarly, use the right field names for PFC_Jour and JOUR_PRODUCTION

13 Replies

Re: Find Max of a time

Try this

Max(TOTAL <PFC_Jour, JOUR_PRODUCTION> Sum(TPSPASSE),  PFC_Jour, JOUR_PRODUCTION, Ligne))

hugomeuris
New Contributor

Re: Find Max of a time

Thank you Sunny for your answer but,

it Gaves me : "Error in expression : Nested aggregation not allowed"

I think it's because there is a sum in the function max :  Max(Sum()) is impossible.

Re: Find Max of a time

Forgot to add Aggr()

Max(TOTAL <PFC_Jour, JOUR_PRODUCTION> Aggr(Sum(TPSPASSE),  PFC_Jour, JOUR_PRODUCTION, Ligne))

hugomeuris
New Contributor

Re: Find Max of a time

It gives me '-' also NULL values.

And this time I have no clue why :/ ...

null values.PNG

Re: Find Max of a time

Would you be able to share a sample to check this out?

hugomeuris
New Contributor

Re: Find Max of a time

I would like to but I'm affraid I don't have the access and the possibility to do that :/ ...

Re: Find Max of a time

Few rows of raw dummy data with the expected output?

hugomeuris
New Contributor

Re: Find Max of a time

oh ... It's what I sent at my first post with a pic ?

I don't know how to share it with an other way, maybe with an excel file ?

Re: Find Max of a time

Yes, in an Excel file would be great

Uploading a Sample

Community Browser