Compare "filtered" metric versus global average

I am building a dashboard that will allow users to select a customer, show metrics for this customer and compare them with the average for all customers and I don’t know how to do this in Holistics.

For instance :

  • I created a dashboard filter to select the customer
  • Added a KPI object showing the turnover for this customer (ex: sum(sales))
  • I would like to show as well the average turnover for all customers (disregarding the selection made in the dashboard filter) in the same KPI widget in the section “Compare with”

How can I achieve that in Holistics ?
Damien

When you set the filter up, towards the bottom of the filter UI, you can select which charts/widgets the filter applies too. I would just unselect the one that you want to cover all customers, and that should work

1 Like

Create 2 KPI widgets, each showing the average turnover for all customers. Add a filter for customer and apply this filter to any one of the widget. now this widget which gets affected by the filter will show the average turnover for the selected customer and the other widget will show average turnover for all customers.
I am not sure about a workaround to compare both in a single widget

Thanks @DataGeekDude , @hari for your answers. My question is about comparing both measures in a single widget, this would allow for very useful insights for our users.

Hi @dacou,

Could you check our guide here https://docs.holistics.io/guides/calculate-percent-of-total to see if it helps?

Ideally, if we have an expression that allows you to whitelist (blacklist) one or multiple filters/dimensions when creating measures, it would be much easier for you.
Something like:

  • revenue = all(sum(quantity * products.price)) → revenue measure will not be grouping by any dimensions
  • or revenue = exclude(sum(quantity * products.price), customers.name) → revenue measure will not be grouping by the customer.name dimension, but can still be grouped by other dimensions.

The above syntax is just an example, and we will need to revise it in the future. But do let me know if you have any concerns.

Hi @Khai_To, this syntax proposition is exactly what I would like to find in Holistics. Something that would both powerfull and user friendly.

Is it something you plan to deliver soon ?

Hi @dacou,

At the time being, our team is actively researching to ensure the best User Experience for this type of calculation so I cannot promise you the exact timeline yet.

This should be included in the AMQL Expression.
Just wondering other than “Compare “filtered” metric versus global average”, are there any other analytics use cases that are on your top priority at the moment?

Hi @dacou,

Just want to share an update with you that our team is actively working on this functionality.

You could refer to the Community Post below as the official announcement and follow the progress from there.