Skip to main content

Posts

Showing posts with the label Quick Feature

Sorting on different values Dynamically

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...

Using a custom sort order for values in a column

Lot of times data in columns needs to be sorted in a particular order. For e,g you bring a string column which has the month name. Since it is string data type, Spotfire would sort it in order of alphabetical order..so April comes before March and so on To fix this issue is very simple and Spotfire has inbuilt setting to define a custom sort order. The steps are pretty simple 1) From you professional client go to Edit >> Column Properties 2)  Select the table and column of interest 3) You will see a Tab for Sort Order for your selected column 4) Select the Radio Button that says "Custom Sort Order' 5) The configure button then gets enabled. 6) Click on the configure button and then arrange your world your way!!!