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: 
Anonymous
Not applicable

SET Analysis With Aggr(),Count(),Max()

Hi All,

Kindly help me out in the below scenario,

I am Having the ID Column in Straight table and I need to use the Expression with Set analysis With all Three Function(  Aggr(),Count(),Max() ) and what will be resultant output.

I have tried the below Script but not Working.i know my script is wrong,

=Aggr(Count(iD),(max({<ID>}id)))

ID  Set Expression()

5

10

15

20

40

do the needful!

stalwar1marcowedelmarcus_sommerdevarasu07jonvitalepradosh_thakur

13 Replies
marcus_sommer

Most interview questions are only stupid and completely meaningless if there is no declared aim which result should be calculated. Just writing an expression with certain functions is like writing any sentences with 10 (certain or respectively random) words ... the results won't be useful in any way ...

Beside this with a bit of guessing it might be something like this:

count(aggr(max({< Dim3 = {'AnyValue'}>} id), Dim1, Dim2))

but like above mentioned each question needs a sensible context otherwise it's meaningless.

- Marcus

jonvitale
Creator III
Creator III

Can you try to explain what you are trying to achieve here? It seems strange to me that you are neither specifying the goal of the expression nor the expected output. How can we possibly help you if we do not know this?

Do you want an expression with ANY possible application of the Aggr, Count, and Max function that also includes some form of set analysis? If so, something like:

Aggr(Count({<FieldWeWantMaxOf = {$(Max(FieldWeWantMaxOf))}>} FieldToCount) , DimToAggregateOn)

This is a shot in the dark, I'd like to hear your specifications more though.

Anonymous
Not applicable
Author

Hi Jonathan,

It is the interview question and i just got Confused like u what is need to achieve,

that's y i posted here to get the clarification on this question 

pradosh_thakur
Master II
Master II

Hi

As the interviewer didn't specify the aim of the question to you we can only guess what the answer would be. There can be many answer but i think the reason why he asked the question is "Nested aggregation can't be used together". For example count(max(sales)). so that may be the reason he/she asked you how will you write it using the aggr function and this is just a guess.

Hopefully you cleared the interview

Pradosh

Learning never stops.