Jump to content
  • 0

How to sort the data in the result page with the most outstanding number of field like ' top sales person'?


Cherry
 Share

Question

Hi, guys! I need some help.

I have a table with fields: customer ID (unique), sales person ID (text 255), timestamp, etc...

This is the case, in every customer who fill up the submission form, they must include the Sales Person ID who assisted them. So, what I want in my result data page is I want to sort out the 'Most Outstanding Sales Person. How can I do that?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @Cherry,

Based on what I understand, in your Reports Page, you will have a column for Sales Person. Then, you would like to sort the report based on the most outstanding sales person. 

First, you need to have a calculated field in your reports. You can have an SQL statement to count how many instances that this sales person is being selected by the customer. 

For example:

SELECT COUNT(Sales_Person_ID) FROM TABLE WHERE Sales_Person_ID=target.[@field:Sales_Person_ID]

Change the field name and the Table Name. 

Lastly, sort the report using this calculated field. See screenshot below for the sample.0.gifScreenshot_84_4.png

 

Hope this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...