Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis with Max Function

Hi All,

I have a requirement where in I have to show users with maximum submission count and the table to show only with flag  = yes

I had written the following expression : this is working fine for max submission based on users but the flag = yes isn't working(the table is showing flag = no as well):

max(aggr(sum({<Flag = {'Yes'}>}Submission),Users))

Any help will be much appreciated.

Kindly let me know if the requirement is unclear

Thanks,

Anupama Jagan

11 Replies
olivierrobin
Specialist III
Specialist III

hello

did you code your set analysis in the expressions of your table ?

PrashantSangle

can you provide small sample data set on which we can try..

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

try below

max({<Flag = {'Yes'}>} aggr(sum({<Flag = {'Yes'}>}Submission),Users))


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anil_Babu_Samineni

Field name is case sensitive, Might be only flag instead Flag ??

max(aggr(sum({<flag = {'Yes'}>}Submission),Users))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ogautier62
Specialist II
Specialist II

Hi,

the max is OK, but you must add too a filter to show field :

if( sum({<Flag = {'Yes'}>}Submission) = max( ......), max(.......),)

regards

Anonymous
Not applicable
Author

this works perfect. But when I add region to the table i'm getting multiple values for the users. Because for same two regions that user has max num of submissions. Is there  any way to get the first instance of it ?

jyothish8807
Master II
Master II

Try this:

max({<Flag = {'Yes'}>} aggr(sum({<Flag = {'Yes'}>}Submission),Users,Region))


Br,

KC

Best Regards,
KC
Anonymous
Not applicable
Author

no its still giving duplicates for users

jyothish8807
Master II
Master II

Could you please what are your dimensions and expressions ?

Or a layout will be helpful.

Best Regards,
KC