Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
load * Inline
[Numbers
20
25
35
35
35
44
11
11
55
55
];
I have used =max(aggr((count(Numbers)),Numbers))
In text box I want 35 instead of 3. Because number 35 has
repeated 3 times.
Any Idea?
Regards
Vinay
May be something like this....
=Aggr(IF(COUNT(Numbers)=MAX(TOTAL Aggr(COUNT(Numbers),Numbers)),Numbers),Numbers)
or
=Aggr(IF(COUNT(Numbers)=MAX({1}TOTAL Aggr(COUNT({1}Numbers),Numbers)),Numbers),Numbers)
May be something like this....
=Aggr(IF(COUNT(Numbers)=MAX(TOTAL Aggr(COUNT(Numbers),Numbers)),Numbers),Numbers)
or
=Aggr(IF(COUNT(Numbers)=MAX({1}TOTAL Aggr(COUNT({1}Numbers),Numbers)),Numbers),Numbers)
Did you tried with the function called "Mode"
Mode(Numbers)
But it will give you null when morethan one value is in first place.
Like if you add one more 55 to your list, it will results you null value.
Hi Vinay,
use the Count() Function.Refer the attached QVW File.
Hi Manish,
Thanks for reply and its working.You are really a GURU.
Regards
Vinay
In Script
Load FirstSortedValue(Numbers,-Cnt);
Load Numbers,count(Numbers) As Cnt Group by Numbers;
load * Inline
[Numbers
20
25
35
35
35
44
11
11
55
55
];
Use this if you have more than one Numbers are appearing in TOP position...
=CONCAT(Aggr(IF(COUNT(Numbers)=MAX({1}TOTAL Aggr(COUNT({1}Numbers),Numbers)),Numbers),Numbers),',')
The previous posted solutions also don't work if more then one value shares first rank. This expression will work for that case:
=FirstSortedValue(DISTINCT Numbers,-aggr(count(Numbers),Numbers))
-Rob
What about second solution given !!!
Rob, I tried a lot but it's not working.
If I want the answer 35 should be there even though if user select any Numbers...how can we achieve?
Manish,
Sorry, I missed your second solution. To ignore selections in my expression just add the {1}
=FirstSortedValue({1}DISTINCT Numbers,-aggr(count({1}Numbers),Numbers))
-Rob