en
Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
Maurice Reid  
#1 Posted : Monday, May 27, 2013 4:46:16 PM(UTC)
Maurice Reid
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/27/2013(UTC)
Posts: 11

Hello All,

I am trying to create an object which shows the top 5 customers by company based on revenue. I have created a visibility agent that selects the customers with the 5 highest revenues. The problem i am having is that when the visibility agents action is set to hide value, it works. But when the action is set to hide rows it does not work, nothing is hidden.

Here is the agent condition used:
Code:
value < (min(d1, d1:d5(v,s), m1))


I have also tried creating a calculated field which counts each customer for each company group and then hide all customers with a count greater than 5 with a visibility agent, but the same thing happens.

UserPostedImage

We use version 2011 build 4665 if this would be of any help.

Any help would be appreciated. Thanks.



Páll Bjarkason  
#2 Posted : Monday, May 27, 2013 9:49:00 PM(UTC)
Páll Bjarkason
Rank: Advanced Member

Groups: extranet\Forum
Joined: 1/13/2012(UTC)
Posts: 164

Hi Maurice

If I understand your problem correct, based on some measure, you want to see top 5 customers per Company.

If you show Company and Customer on the y-axis and sort in ascending order (starting with the highest number) then you can place the following code into the visibility agent using the hide member smart agent:

count(d1, d1:0(s), m1) > 5

The condition is: Count customers from the top "within this Company". HIDE any customers (member) with a value greater than 5. I.e. the 6., 7. etc. top customers are hidden.

N.B. To understand the code, you could create an extra calculated column with this code: count(d1, d1:0(s), m1)

Edited by user Tuesday, May 28, 2013 11:49:12 PM(UTC)  | Reason: Not specified

Best regards

Páll, CTS
Maurice Reid  
#3 Posted : Monday, May 27, 2013 10:08:47 PM(UTC)
Maurice Reid
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/27/2013(UTC)
Posts: 11

Thanks a lot Páll your solution worked perfectly.
Users browsing this topic
Anonymous
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error