Structuring a workfile with non-unique values
Posted: Fri Feb 14, 2025 1:39 pm
Hi there. I’m looking for some help with converting a large panel of data that has non unique date identifies into a set of timeseries.
I can’t post the datafile right now so I’ll describe it as best I can. I have a set of observations, each belongs to a category, has a date attached to it, and a transaction value. I want to create a timeseries of transaction values for each category. All this would be straightforward except that some categories might have more than one transaction on any given date, so I need to sum across those observations.
My second problem is that it’s a really large workflow. Something like 180 categories and 450,000 observations, so I’d prefer not to loop through the observations if I can avoid doing so - particularly as I will have to update the data quite frequently.
Are there any solutions to this, or am I looking at some kind of loop using @uniquevals? Thanks in advance for any advice.
I can’t post the datafile right now so I’ll describe it as best I can. I have a set of observations, each belongs to a category, has a date attached to it, and a transaction value. I want to create a timeseries of transaction values for each category. All this would be straightforward except that some categories might have more than one transaction on any given date, so I need to sum across those observations.
My second problem is that it’s a really large workflow. Something like 180 categories and 450,000 observations, so I’d prefer not to loop through the observations if I can avoid doing so - particularly as I will have to update the data quite frequently.
Are there any solutions to this, or am I looking at some kind of loop using @uniquevals? Thanks in advance for any advice.