Hello Alteryx community,
I need to calculate sales (last 6 months and last 12 months) for every unique customer name- item- transaction type combination in my dataset. Dataset has multiple rows with same customer name and item number but different invoice date.
Last 6/12 months sales calculation will be based on current date(today's date).
6 months (i.e. last 180 days Sales) will include all sales between 26th January 2021 and 25th July 2021.
Dataset -
Item Customer Invoice Date Invoiced Quantity Transaction Type
1 ABC 1st July, 2021 50 T1
2 ABC 1st Dec, 2020 100 T2
3 CDE 1st Aug, 2021 20 T3
1 ABC 1st October, 2020 25 T1
2 CDE 1st May, 2020 75 T2
Example ---
For customer ABC, item 1 and transaction type T1, Last 12 months sales will be = 50+ 25 = 75 units
For customer ABC, item 1 and transaction type T1, Last 6 months sales will be = 50 units.
I'm new to Alteryx. I could not figure a way to build this complex condition in Alteryx.
Your help is appreciated. Thanks!