Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Allocating sales across rows

MRF
5 - Atom

Hi,

 

I'm trying to allocate sales across multiple rows and am wondering the best method - multi-row tool or something else perhaps.

 

I have Region, Store Number, Product, Dollar Sales, and Store Location of product. The sales data doesn't/can't separate out sales for the different locations in the store (aisle, end cap, display, check out) so each record for that region/store/product/location has the same dollar amount. Not all products are in the same number of locations in each store, so there isn't a consistent number of rows per store per product - it varies from 1 to 4 rows. 

 

What I want to do is allocate that total amount evenly across the total number of locations in the store, otherwise, the sales amount gets double/triple/quadruple-counted and overstates sales. So, if the product is in 3 locations in the store, divide the total dollar sales by 3 and populate a new field for each of the 3 rows with that more accurate figure.

 

I've attached some sample sales data - I added a field "Allocated Sales" in the sample data for illustrative purposes.

 

Thanks in advance!

3 REPLIES 3
LordNeilLord
15 - Aurora

Hi @MRF

 

This is a perfect job for the summarize tool!

 

If you take the AVG Sales (or min/max) for each region, store & product and count the number of aisles you can then calculate to allocated sales:

 

Allocated Sales1.PNG

Then join this back into you original workflow:

 

Allocated Sales.PNG

I have attached an example

rahul1011
8 - Asteroid

You can use the summarize tool to find the count of the number of times each Region, Store and product combination is appearing, append the count column to the data and use formula tool to divide by the count.

MRF
5 - Atom

Thanks to you both for the quick response!

 

This will work very effectively.

Labels