Title: Custom &#8220;compare&#8221; values for analytics
Last modified: January 23, 2021

---

# Custom “compare” values for analytics

 *  Resolved [jakevoelcker](https://wordpress.org/support/users/jakevoelcker/)
 * (@jakevoelcker)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/custom-compare-values-for-analytics/)
 * I would like to extend the functionality of woocommerce-admin analytics to include
   sales targets.
 * In the same way that current sales can be compared to last year’s sales, I would
   like to add weekly sales targets or forecasts which current sales could be compared
   to.
 * Can anybody give me some hints about where to get started? What would be the 
   best hooks and filters to use to add an extra dataset?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [jakevoelcker](https://wordpress.org/support/users/jakevoelcker/)
 * (@jakevoelcker)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/custom-compare-values-for-analytics/#post-13949537)
 * I should clarify: I would like to add this functionality to all reports in woocommerce-
   admin analytics. I have seen the example extension ‘sql-modification’ from [https://github.com/woocommerce/woocommerce-admin/tree/master/docs/examples/extensions](https://github.com/woocommerce/woocommerce-admin/tree/master/docs/examples/extensions)
   which adds a currency filter to all reports.
 * I would like to do something similar, but instead of currency, I would like to
   add an extra dataset. It would be a very simple dataset: simply a daily sales
   target. It would be displayed instead of last year’s sales, for comparison with
   this year’s sales.
 * What is the best method?
 *  Plugin Support [John Coy a11n](https://wordpress.org/support/users/johndcoy/)
 * (@johndcoy)
 * Automattic Happiness Engineer
 * [5 years, 3 months ago](https://wordpress.org/support/topic/custom-compare-values-for-analytics/#post-13960041)
 * Hi [@jakevoelcker](https://wordpress.org/support/users/jakevoelcker/)
 * You might want to check out our advanced WooCommerce Community in Slack:
 * [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
 * or the Advanced WooCommerce Facebook Group:
 * [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 * There are many developers gathered in those communities who may be able to help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom “compare” values for analytics’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-admin_b298d1.svg)
 * [WooCommerce Admin](https://wordpress.org/plugins/woocommerce-admin/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-admin/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-admin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-admin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-admin/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [reports](https://wordpress.org/support/topic-tag/reports/)

 * 2 replies
 * 2 participants
 * Last reply from: [John Coy a11n](https://wordpress.org/support/users/johndcoy/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/custom-compare-values-for-analytics/#post-13960041)
 * Status: resolved