cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying top N customers

Former Member
0 Kudos

Hi,

I have a requirement where the customer needs to enter a value for variable N and the query has to display the top N customers.

For EX ; if you enter the value as 5 it will display the top 5 customers list.

I know we need to use formula variables for this but I am not very clear on the steps. Can anyone please help me with this.

Thanks and regards,

Sahana

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you have a key figure for quantifying the usefulness of a customer to you (for ex. the overall sales to a customer or the overall qty sold to a customer), use it in a condition in the query. There is a provision to define a variable for N when you create a condition.

Former Member
0 Kudos

Hi,

Thanks for ur reply. Can u tell me how to use the formula variable in the condition to get the TOP N value..

Thanks,

Sahana

Former Member
0 Kudos

go to the conditions icon on top in bex.

Click on new once u get the pop up of condition. IN the below u will get one option variable entry select that. And select the create icon besides to that create a variable with user entry default processig type. and give that variable in the condition.

Khaja

Former Member
0 Kudos

Hi,

I need to the top N customers with reference to the Net Sales value. How do i sort the data for this. Is this done at the query level or at the cube level. Kindly guide me in this.

Thanks and regards,

Sahana

Former Member
0 Kudos

Your condition is based on the key figure you select. So in the Conditions dialogue box you select the Key Figure you want your condition based on and then in the lower section you select the type of condition - i.e. Top N.

Regards

Gill

Former Member
0 Kudos

Hi,

Do you have a cube with customer field and sales value KF field? If so, you can use the customer field in rows, the KF in columns and create the condition based on this KF. In the condition dialog box, you have a list of chars on the top and 2 options. Select the 2nd option (single chars or combi...) and choose the customer field from list of chars (I am not sure what the diffs in output are between these 2 options, but this should work for now)

Below, define your Top N condition with variable entry for N. During variable creation, in the 'Processing by' field, select the 'User entry' option.

Edited by: Sanjeev Koganti on Jan 8, 2008 3:50 PM