cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jnrezk
Helper I
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

 

 YesterdaySame day 1 week agoSame day 2 weeks agoSame day 3 weeks agoSame day 4 weeks agoAverage of Same day 1 to 4 weeks ago % change of Yesterday vs Avg 
Visitors100101111123124115-13%
Quote Starts121121123134123125

-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
amitchandak
Super User
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

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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.

Hi.  @jnrezk 

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

calculation-groups 

https://apexinsights.net/blog/10-uses-for-calculation-groups 

leveraging-calculation-groups-power-bi 

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!