Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Converting Weekly Amounts to Monthly Amounts

etcbiz
5 - Atom

I have some data that I'd like to convert the weekly amounts to monthly amounts that the amounts actually were earned within that month. I'm able to convert the weekly amounts to monthly amounts by taking the DateTimeMonth for the start of the week but that becomes hard for certain weeks that are in two months. See Example below:

 

 

SalespersonWeek DateRevenue
Joe

1/1/2023

3000
Joe1/8/20232000
Joe1/15/20234000
Joe1/22/20236000
Joe1/29/20235000
Joe2/5/20231000

 

Technically revenue for January should be: (3000+2000+4000+6000+3000=18,000). But if I use the DateTimeMonth and then cross tab it, the January amount becomes 20,000. How do I go about fixing this?

1 REPLY 1
Carolyn
12 - Quasar
12 - Quasar

I would use a Generate Rows tool to get all the days within the week. Then you can allocate based on the relevant days within each month. I was assuming that Saturday and Sunday don't count for the revenue split and Monday through Friday do. However, I'm getting $17K for January, since 1/30 and 1/31 are in January, but it looks like you're counting 3 days, so maybe you're on a Sunday-Thursday week (in which case, you'd just change my Filter tool)

 

2023-08-17 10_31_31-Window.png

Labels