Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
anupamajagan
Creator
Creator

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.
PrashantSangle

try below

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


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Anil_Babu_Samineni

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

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

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

anupamajagan
Creator
Creator
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
anupamajagan
Creator
Creator
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