I've got 2 columns of numeric data and need to add a calculated field that creates a ratio of one against the other. This is simple enough, but I can't seem to be able to correctly use the field in charts / tables. The issue I have is which function should be used to display the data accurately (i.e. one that recalculates the ratio on the totals rather than the individual rows of data)? Using 'mean' is inaccurate as it simply averages the ratios and doesn't take into account the original values. I'm probably missing something obvious..........would appreciate a nudge in the right direction.
Scott - the first point to note is that your formulae are calculated globally and will not currently reflect filtering actions. That said, to see the options for calculating using granular, grouped or aggregated data, you should try creating 3 Table views set to show the All Data subset, one view using Grouping, one using Aggregation, and one using neither. Start with the Grouping example by choosing a category to group by. Under the Formula drop down, you will see that there is an option to either calculate using the un-grouped data, or apply the formulae to the grouped values.Try it both ways. Now go to the Aggregation Table View example and apply an aggregation on the same basis as the Grouping example. In the Aggregation drop down, for each formula field, you will see the option to set the aggregation function to be Formula result, which means that the formula are calculated using aggregated values. Finally, in the Table View with no Aggregation or Grouping set, you can try re-writing the formulae using the SUBSET_MEAN function.
Sorry, just to follow up on this. Please could you explain how these methods can be applied to more complex views - such as tile views and graph views? For example, I've got a tile view with the following settings:
Aggregated by campaign
Contents: campaign
Grouped by country
Sized by lead volume
Coloured by cost-per-lead
Value = lead volume
The cost-per-lead needs to be grouped/aggregated but there aren't the same options you explain above in this view. Similarly for a graph view where the x axis and y axis are both calculated ratios.
Scott- The Aggregation drop-down menu is available in all views, Grouping is a presentational option unique to the Table View. You will need to use Aggregation, and write the formulae so that the fields to be visualised can be set to Formula result in the Aggregation drop down. Feel free to send us the file if you need help with the formulae.