Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Correlation between multiple variables

nidah5
8 - Asteroid

Hi,

have an issue with the correlation for multiple variables, using pearson or others i can't find for multiple variables in a go with a group by function.

 

e.g

i have Revenue as column and have to check whether Cost, margin, discount have any correlation to Revenue but according to the year and location.

 

 

#correlation

#groupby

9 REPLIES 9
ImadZidan
12 - Quasar

Hello @nidah5 ,

 

Can you please provide some sample dummy data. It will help.

 

We will explore this task together. 

echuong1
Alteryx Alumni (Retired)

There is not a group by option in that tool, or any of the predictive tools. To do this on a per year and location basis, you'd have to filter for each combination. Ex: filter for location #2 and year 2018, and then do the correlation.

nidah5
8 - Asteroid

Hi,

have attached a file

it has 5 variables

CUSTOMER & DATE field which should be used as group by

Revenue as Y, AND Cost & Margin as X

So i need to check for a particular CUSTOMER on given DATE, what's the correlation of revenue with cost & revenue with margin.

 

attached file has RAW DATA and Second CORRELATION Sheet as the the format of final product.

 

please let me know if this helps @ImadZidan  @echuong1 

ImadZidan
12 - Quasar

Hello @nidah5 ,

 

@echuong1  is quiet right about the grouping feature.

 

Please have a look at the attached and it visualised what @echuong1  was saying about creating filters and what have you.

 

One thing I should point out is that you need to have at least one observation to apply the PCorr.

 

Now, having said said the workflow should give you an idea. What I would say, you can also change the workflow to run as a macro may be an iterative or a Batch. At least you have a starting point.

 

Any problem, shout back.

nidah5
8 - Asteroid

@ImadZidan  will check and get back

ImadZidan
12 - Quasar

Hello @nidah5 ,

 

Yes of course, I will keep it in mind next time.

nidah5
8 - Asteroid

@ImadZidan  Thank you so much, it works.

but i have over 57 customers and it won't be possible to run line of code for al of them, i tried to run iterative macro in the workflow but i don''t understand why doesn't it get configured to the workflow.

any help over iterative macro?

echuong1
Alteryx Alumni (Retired)

You actually want to create a batch macro, and use your unique customer as the group by field.

 

This article should help you get started:

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

ImadZidan
12 - Quasar

Hello @nidah5 ,

 

Have a look at @echuong1 referenced article.

If you couldn't get it to work, we will look together and figure it out.

 

Let me know

Labels