Alteryx Designer Desktop Discussions

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

How to sum specific month's based on two conditions?

rlupe
7 - Meteor

Hello,

 

MTY = Month designation (MTY 300 = Dec 2019)

 

I am trying to get a store's total sales for 'this year' and 'last year' based on a specific MTY, then want to compare against the stores in the territory for the same time range.

 

I have individual store sales by month (MTY) and territory in one tool, and the specific MTY and territory I want to compare with in another tool.

 

This is my first post, let me know if you need more info.

 

Expected output for territory 101:

rlupe_0-1678312766717.png

(edit: output to single line)

 

5 REPLIES 5
binuacs
20 - Arcturus

@rlupe Can you explain the logic for calculating the amount of each field? How did you get 911626 as TY sales for 101?

rlupe
7 - Meteor

Forgot MTY column

 

Store: 1

MTY: 290

TY Sales: sum MTY 290-301 Sales (Store 1) = $911,626

LY Sales: sum MTY 289-278 Sales (Store 1)

Total Territory Sales TY: sum MTY 290-301 Sales for all stores in territory 101 (stores 1, 2, 3) 

Total Territory Sales LY: sum MTY 289-278 Sales for all stores in territory 101 (stores 1, 2, 3)

 

Same range for Transactions.

 

Yoshiro_Fujimori
15 - Aurora

Hi,

One way of doing this.

Yoshiro_Fujimori_2-1678321669848.png

I prefer the below format (see the 1st line).

Yoshiro_Fujimori_1-1678321118534.png

 

But I also tried to follow your format (see the 2nd line).

Yoshiro_Fujimori_3-1678321748172.png

 

Does it work for you?

rlupe
7 - Meteor

Yes this works, thanks! 

Will I be able to connect it to the text input below for stores 1, 4, and 7 for their respective MTYs? 

Yoshiro_Fujimori
15 - Aurora

You can use Join tool with key "Store_Num".

Labels