cancel
Showing results for
Did you mean:  Helper I

## Percent change for Yesterday vs previous 4 week average

Hi there,

I was wondering how I can easily do a percent change across yesterday's data vs the average of the same day for  the 4 weeks prior. This will be for multiple metrics so would I have to create a measure for each metric or is there some automated way to have it work for each metric.

Here's what I'd like to acheive

sample data

 Yesterday Same day 1 week ago Same day 2 weeks ago Same day 3 weeks ago Same day 4 weeks ago Average of Same day 1 to 4 weeks ago % change of Yesterday vs Avg Visitors 100 101 111 123 124 115 -13% Quote Starts 121 121 123 134 123 125 -3%

I would like to then visualize the data in either a key metrics card with the % change below in the same card or in a table as a column header next to Yesterday's data.

3 REPLIES 3  Super User

@jnrezk ,  Try measures like below with help from date table

example

Day Behind yesterday = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,DAY))

7 Days Behind yesterday = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-8,DAY))

14 Days Behind yesterday = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-15,DAY))

21 Days Behind yesterday = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-22,DAY))

28 Days Behind yesterday = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-29,DAY))

refer if needed

Proud to be a Super User!  Helper I

Hi, I am trying to avoid a ton of calculations as I have to do this for like 10 metrics and then i have to make at least 5 calculations per metric? Is there a simpler way that could work for all the metrics together? or at least can i make the average calculation and percent change calculation in one measure so there's less to make.  Community Support

Hi.  @jnrezk

You can try calculation group to reduce redundant measures created by grouping standard measure expressions.

Best Regards,
Community Support Team _ Eason  