Sometimes you need to sort charts based on different values rather than metrics the chart is showing. For e.g You could be showing total sales for territories, but you really want to sort the results by Average Discount offered per territory , or may be average sales per for territory. Or may be you want to give the user the flexibility to choose how he wants to sort. Spotfire's DenseRank function and property controls comes in real handy here. In my example I mentioned above, I will introduced a DocumentProperty SortBy and use expressions to set the value. The Property si exposed as a drop down controls in the text area. The four expressions I use are DenseRank(Avg([Gross Profit]) over ([Territory])) DenseRank(Sum([Gross Profit]) over ([Territory])) DenseRank(Avg([Discount]) over ([Territory])) DenseRank(Sum([Discount]) over ([Territory])) And the on the chart I introduced the property on the category axis as $sortby So my Axis Expression looks l...
Unofficial tips and tricks for various analytics tools