The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to transform daily time series to monthly data and keeping the years ?
These are the dataset statistics. As you can see it runs over several years (from jan 2015 till may 2020)
Here is a sample of how my data looks like before transformation.
How can I transform my dataset to something like this ?
Sum of Sales per month per year.
I already tried the following:
- convert date to numerical (keep old attribute) => date_month
- aggregate sales to sum(sales)
- removed duplicates for date_month
- inner join on date_month
But this results in a sum of months over ALL the years instead. I only have 12 months now.
Any suggestions ?
Here is a sample of how my data looks like before transformation.
How can I transform my dataset to something like this ?
Sum of Sales per month per year.
I already tried the following:
- convert date to numerical (keep old attribute) => date_month
- aggregate sales to sum(sales)
- removed duplicates for date_month
- inner join on date_month
But this results in a sum of months over ALL the years instead. I only have 12 months now.
Any suggestions ?
Tagged:
0
Answers
You should generate a attribute which has date_month combined with year, like 01-2015, 02-2015 and then you can aggregate over this attribute which will help you achieve the table of sum of sales over every month specific to years rather just month specific as your results indicate. Let me know if this works for you.
Harshit
date_parse_custom(date_str_custom(date,"1/M/yyyy", "be"),"dd/MM/yy","be")
This sets the date to the beginning of the month