# Alteryx Designer Discussions

Andy Uttley, Alteryx ACE, makes music with Alteryx | Math + Music
SOLVED

## Finding abnormal % change from absolute figures

Highlighted
8 - Asteroid

Hello,

i have data as below and need to calculate for each product each week what the weekly percentage change is and whether that is normal. I am struggling to calculate a % change for each week. Once i have those i hope to calculate the standard deviation and flag anything that is outside 2 standard deviations as abnormal.

 Product codes Date Volume a 13/01/2020 3 a 20/01/2020 4 a 27/01/2020 2 a 03/02/2020 4 a 10/02/2020 3 a 17/02/2020 2 a 24/02/2020 4 a 02/03/2020 5 a 09/03/2020 6 a 16/03/2020 3 b 13/01/2020 2 b 20/01/2020 9 b 27/01/2020 8 b 03/02/2020 7 b 10/02/2020 8 b 17/02/2020 7 b 24/02/2020 8 b 02/03/2020 6 b 09/03/2020 6 b 16/03/2020 8
Highlighted
14 - Magnetar

Hi @Usamah22,

it's pretty easy to get the weekly change in %. Here is how to do it:

Configuration:

Output:

Do you want a "moving" standard deviation or one for a and one for b? Current workflow is attached and I'll help to figure it out when I am clear about the standard deviation.

Best

Alex

Highlighted
Alteryx Certified Partner

@Usamah22 - attached is an attempt to compute %change.

Hope this helps.

For standard deviation, the logic will depend on you looking to compute standard deviation at the product level across all weeks, or at a weekly level across all products.

Highlighted
8 - Asteroid

@grossal wrote:

Hi @Usamah22,

it's pretty easy to get the weekly change in %. Here is how to do it:

Configuration:

Output:

Do you want a "moving" standard deviation or one for a and one for b? Current workflow is attached and I'll help to figure it out when I am clear about the standard deviation.

Best

Alex

SD for each product across weeks please. Thanks for this.

Highlighted
8 - Asteroid

Highlighted
14 - Magnetar

There we go!

Result:

Workflow:

Full workflow attached. Let me know if this is what you are looking for!

Note: I added an 'absolut' function around change, that way we also get negative abnormal values.

Alex

Labels