DSA Calculated Objects

From DataSelf Knowledge Base
Jump to navigation Jump to search

Many of these DSA objects can be found in Sample workbooks in the DSA Default Project. Using DSA Desktop, they can be copied from the Sample workbook and pasted into your workbook.

Top/Bottom Performers

Add this parameter, then a Calculated Field. To use it, the rows must be sorted in the desired ranking. (Sort descending on a measure column.)

Top/Bottom parameter

  • Create an integer parameter named "Top/Bottom" with current value of 10, Display automatic, Allowable Values: All
  • "Top/Bottom" comment:
Top/Bottom: Defines the number of rows to be included in the “Top and Bottom” calculated measure.
If desired, Right-click > “Show Parameter Control” to change the value from its default value of 10.

TopBottomParameter.PNG

"Top and Bottom" calculated field

IF index() <= [Top/Bottom] THEN "1. Top"
ELSEIF index() >= (size()-[Top/Bottom]+1) THEN "3. Bottom"
ELSE "2. Middle"
END
  • "Top and Bottom" calculated field comment:
Top and Bottom: Displays the query’s top and bottom performers. 
1. Sort the query by the desired measure. 
2. Drag this “Top and Bottom” field to the Filters shelf. Unselect “2. Middle”. 
3. See also:  “Top/Bottom” parameter, below.

TopBottomCalc.PNG