I cannot get either TOPN or RANKX to show the data that I need. It either does not show correctly with the Top 10 or Bottom 10 that I need or if I use RANKX first, I get "1" for all "Names". I deal with sensitive data so I created a mock data table that has similar columns that I show in my dataset.
I need to show the Top 10 and Bottom 10 "Customers" based on a specific time period that can be filtered by the end user. The main table that I have has an "Order request" per row with date of order, location of order, order type and whether it was finalized or not ("Shipped"). My dataset has 100's of customers both Domestically and Internationally. I have the above mentioned Order request table along with a fact table with all Customers and their location. Below is an example of the Order Request table with the columns that I need to filter by.
Name | Order Type | Location | Outcome |
John Smith | Order | Domestic | Shipped |
Jane Doe | Order | Domestic | Shipped |
Chris Williams | Trial | International | Shipped |
Jack Roberts | Order | Domestic | Cancelled |
Christina Connelly | Trial | International | Shipped |
John Smith | Order | Domestic | Shipped |
Jane Doe | Order | Domestic | Cancelled |
Chris Williams | Trial | International | Shipped |
Jack Roberts | Trial | Domestic | Shipped |
Christina Connelly | Order | International | Cancelled |
John Smith | Order | Domestic | Shipped |
Jane Doe | Order | Domestic | Shipped |
Chris Williams | Trial | International | Shipped |
Jack Roberts | Order | Domestic | Cancelled |
Christina Connelly | Order | International | Shipped |
Like I said, I have thousands of order dating back several years and the request offer table will have multiple rows per customer for their multiple orders. To save space on the report, I would like to have a slicer based on the "Location" column which will switch the Top 10 and Bottom 10 from Domestic and International customers. That is part of the issue I have had is to have a Rank or Top 10 for Domestic only and then the same for International, but their data is mixed in the same table.
I have tried:
Please provide sanitized sample data that fully covers your issue, including the timestamp column.
Please indicate expected outcome.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!
User | Count |
---|---|
223 | |
71 | |
67 | |
61 | |
59 |
User | Count |
---|---|
251 | |
232 | |
106 | |
82 | |
72 |