Skip to Content
author's profile photo Former Member
Former Member

Displaying top N customers


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,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 03, 2008 at 05:25 AM


    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.