I want previous year sales data,
Need to match the current date with previous year date and get sales data for the previous date.
I have tried using join and union tools,
initially joining the previous year transaction date with current year transactiondate and trying to get the prev year net sales, but values are not accurate.
i am getting null for previous year sales
Current Year Date | Previous Year Date | Current Year Sales | Previous Year Sales |
21-12-2021 | 20-12-2020 | 166668888 | Null |
Can you provide some sample input (which has both current year and previous year data) and expected output It will help us get a better understanding of the usecase.
We will be happy to help : )
@somuayoddhya
If I understand you correctly.
Since you want the date to be matched, so lets remove the year.
Hi @somuayoddhya, assuming your data is structured in a manner where current and prev year values are part of the same column attribute, you can create a new date column and subtract one year from each date, and join it back to itself to get current and prev yr values. Attached is a proof of concept of what that might look like
Hope this helps!
My approach is similar to @AbhilashR I am using find and replace tool instead of join tool to include row entries even if they don't have the previous year.
Workflow:
Happy to help : )
Happy new year to you and your close ones : ) May it be filled with happiness and prosperity =D @AbhilashR and @somuayoddhya
Adding to the below, please find my sample work flow.
I am supposed to group by ID column to get both Value and Right Value in same row.
But the values should not be summed if i use group by, please help.