Week over week percent change

Hello - I am using Sam’s week over week change formula from one of his YouTube videos. In my case, I am using it for showing the total of returns from one week, to the next. For example.

Week Number Qty to Return % Diff from prior week
27 34 23%
28 12 64%

What I would like to do, is have a separate measure that calculates the % difference between the weeks. So in the example above, the Week 28 percent difference (from Week 27) would be 64%. Any help is appreciated!

Week over Week2 =

VAR CurrentWeek = SELECTEDVALUE(‘Date Table’[Week Number])

VAR CurrentYear = SELECTEDVALUE(‘Date Table’[Year])

VAR MaxWeekNumber = CALCULATE(MAX(‘Date Table’[Week Number]), ALL(‘Date Table’))

RETURN

SUMX(FILTER(ALL(‘Date Table’),

IF(CurrentWeek = 1,‘Date Table’[Week Number]=MaxWeekNumber && ‘Date Table’[Year]=CurrentYear - 1,‘Date Table’[Week Number]=CurrentWeek - 1 && ‘Date Table’[Year]=CurrentYear)),[SumX Qty to Return])

Hi @richmont. Can you post a (sanitized, if necessary) PBIX file along with a mock-up in Excel of what you are looking for? These would help us visualize the outcome and hopefully identify a path forward. (Going offline now, but I’ll have a look in the morning.) Greg

Hello,

The outcome I am looking for is very straightforward.

I have a table visual that shows these 3 columns: 1)Week Number 2)Qty to Return 3)WoW % Change

The formula I posted previously gets me the week over week Quantity Difference. What I am looking for now is the week over week Percent difference.

Did you try doing a search within the site/youtube?

Good Luck

Thanks for posting your question @richmont. To receive a resolution in a timely manner please make sure that you provide all the necessary details on this thread.

Here is a potential list of additional information to include in this thread; demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

Including all of the above will likely enable a quick solution to your question.

@richmont,

This video will get you 95% of the way there:

From that point, you’ll just need to create a simple measure:

Pct Change =
DIVIDE(
	CurrentValue- PreviousValue,
	PreviousValue
)

If you care only about the magnitude of the change, not the direction (which your post above seems to imply, just add the following:

Pct Change =
    DIVIDE(
    	ABS( CurrentValue- PreviousValue) ,
    	PreviousValue
    )

I hope that’s helpful.

  • Brian

Hi @richmont, did the response provided by @BrianJ help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark the thread as solved. Thanks!

Thanks Brian. Yes, I used that video initially, and your pct change solution was all I was missing. Thanks!