Ranking across Multiple Dimensions
Ability to rank dynamically can be achieved by using the Group by property/parameter in the RANK function. We will need to determine a method for calculating a group by value based on the values selected by the user. Normally, the RANK function is fixed to the dimensions in the grid, but in our case, we need it to change as the user changes the hierarchy levels.
This solution will heavily use the DISCO methodology and will require a system module for every dimension. In these modules, we need to calculate a unique value at every level of the hierarchy and pass that value to our group by line item. Lastly, we will need a reporting module and a respective dashboard to display the results.
Summary of Steps
- Create System Modules for all the dimensions, including time. Create a single line item that holds all the unique values of each list item at every level of the hierarchy.
- In the reporting module create a line item that concatenates the chosen hierarchy levels and use this line item as the group by property in the RANK function
- Create a friendly dashboard to accommodate this report.
Step 1: System Modules
This step is the most tedious, but once created it can be reused many times. Our strategy is to create a line item that can detect what level of the hierarchy we are on. Once we know that, we can calculate a text line item that is assigned the level of that hierarchy.
SYS01 P3 Product: Product Dimension
With the spirit the PLANS methodology, we have broken up all the formulas into their component parts. We start with the list format, convert it to text, assign a hierarchy value, then build our group by property.
This is also one of the very few times were a subsidiary view is helpful. You will see a few line items with this applied.
Note: To help simplify this article we will assume the same method to be applied to the Reporting Units dimension so we will only show the product system module build-out here.
P3 Value Ratio = P2 Value / Denominator
P2 Value Ratio = P1 Value / Denominator
The most important line items here are “P3 Value” and “Text to Use”. P3 value has a numeric value at each hierarchy level. We’ll need that to assign a text value to the Text to Use line item. The “Text to Use” line item will be our lookup value for this dimension, and we will concatenate with the other “Text to Use” line items from the other dimensions to create an overall Group By Text formatted line item.
SYS03 Time Selected:
The time system module is built almost the same as the standard lists except for the summary column.
Month value ratio = Quarter value / denominator
Quarter value ratio = Half value / denominator
Half value ratio = Year value / denominator
Year value ratio = All Period value / denominator
SYS04 C3 Customer Location
Our customer system module is rather simple. We just need one line item that contains a Boolean to detect the customer level only. Set the line item = TRUE. We will use this to filter our grid in the reporting module.
Step 2: Create the Group By line item and assign it to the RANK function
Now that we have all our “Text to Use” line items we need to concatenate them together to form a group by attribute text line item we can use in the RANK function. As mentioned earlier, we made a shortcut by entering the sales directly into our reporting module. Normally, these sales would come from a data hub or transaction module within the model or from an import process.
Group by =
'SYS01 P3 Product'.Text to Use & " | " & 'SYS02 Reporting Units'.Text to Use & " | " & 'SYS03 Time Selected'.Text To Use
The group by is simply a concatenation of the “Text to Use” line items from each of the system modules. We then use that line item in our RANK function.
At the lowest level, our Ranking is working perfectly! Notice how the Group By line item reflects the choices made by the user in the selectors. We also have sequential ranks. Check that off our UAT list!
At the most aggregate level, our ranking is also working well here.
Step 3: Create the Dashboard
As a last step we want to allow the sales manager the ability to rank his/her customers. With a few clicks we can create a simple dashboard. Don’t forget to turn on sync.
Note: Special Thanks to Dear Friend @JaredDolich for writing this beautiful piece of article.
With the extension to the RANK() function explanation, Would like to highlight 2 points
1. RANK() function constraint can be handled by introducing a line item in the module itself (even if TIME / Version not to be dimensioned)
a. 2 lists (Products, Origin)
b. 1 Module
c. 3 line items
Sales Volume = Input cell
Rank / Sort = RANK(Sales Volume, ASCENDING, SEQUENTIAL, TRUE, State)
State = List Formatted line item (ORIGIN)
2. One of the vital parameters is "Equal value behavior (optional)" (although it is optional to use). WHY?
Because once the same values are within the "Group by" then it will use (MINIMUM (default), MAXIMUM, AVERAGE, SEQUENTIAL)** and decide the ranking.
**So, always pay attention towards this parameter.2
- 0 All Categories
- 8.5K Forums