Hello Community,
I am working with a live data set and am getting a bit muddy with dates. I want to add a column for each of my key measurements i.e. PY Sales, PY Units, etc aggregated at the product level.
So far I have been only able to produce a workflow that will give me last year / current year (attached) but all aggregated to the year. What I really want is a PY sales/PY units for at minimum a week. This seems like something there is a simple solution for that I have just missed thus far.
I have attached a workflow with Superstore date as an example.
Solved! Go to Solution.
Hi @knlekash ,
I've inserted the month and week column and I've done the calculations for both, but it didn't make much sense since your data is not distributed between all months/weeks.
Let me know if I'm in the right path here 🙂
Best,
Fernando Vizcaino
Hey Fernando,
I went back to the data-source I am trying to solve for and what I see is a little different than my OP.
The depth of granularity is by a single date. Each date & product has both a column for Sales and for Sales YA. What is the most effecient way to give myself a column for Sales YA, this column should go back beyond current year (2020) and into 2019 as well
Hi @knlekash ,
Would you be able to share a sample output of what you are trying to achieve? I'm not sure what you are calling Sales YA
Best,
Fernando V.
Hi @knlekash ,
I'm attaching a workflow where I do an automatic way of using years as previous and also current depending on the year you are analyzing.
Each summarize was grouped by month and year respectively but you can try to look using the month-day as well.
Let me know if this makes sense to you or if I'm going in a totally different path.
Best,
Fernando Vizcaino
@knlekash - Hope the attached workflow helps, (you need to replace the input file with your super store tableau extract file ) . It calculates the Sales YA and Order Date YA , for any product with null as the date and sales YA , there was no sale corresponding to the exact date in the previous year.
cheers,
Ramesh
Hi Fernando,
I just gave your workflow a try, it looks like it accomplishes aggregating up to a week / month in my particular case I was trying to find by day.
@ramesh_neel solution looks like what I was trying to deliver, thank you all!
@knlekash - Glad it worked for you 🙂