Compare Current Day with the last 7 days average

Hi

I’m trying to build a look/table which shows a measure for current day value, as well as an average of the last 7 days. The issue is this measure is a “number” type cuz it’s a calculation of division. So I’m having trouble creating this measure with filters of date_day_date. Is there any other ways to have the same measure but applied with different time frame/filter in the same look/dashboard?

Thanks!

0 1 1,533
1 REPLY 1

I think you can achieve your goal by creating two custom fields along with a date filter on your explore.

Suppose you have a measure that represents the value per day. In my example - Count.

  1. To create current day value, you can create a Custom measure with the following custom filter :

    ${history.created_date} > add_days(-1,now())
    a475141a-6f56-4014-a6d4-24364fb16c40.png
  2. To create Last 7 days Average, you can create a Table calculation with the following Custom Expression:

    round(${history.count}/7,1)
    dd23999d-e070-4d02-aebe-ea9871bf3c67.png
  3. Please filter the explorer with “is in the past 7 days” and it should show the values you wanted to see.
ecf83062-f209-4b9d-ab17-cffcb836c7b4.png
Top Labels in this Space
Top Solution Authors