Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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