I have a requirement like if there is no record for a perticular date, it should be filled with previous date data.
Ex:
Date Value
2024-01-01 10
2024-01-02 23
2024-01-03 43
2024-01-05 12
2024-01-06 65
2024-01-07 23
2024-01-08 45
2024-01-11 54
2024-01-12 34
So, I dont have data for 2024-01-04, 2024-01-09, 2024-01-10. These records must be filled with previous days data
My expectation is:
Date Value
2024-01-01 10
2024-01-02 23
2024-01-03 43
2024-01-04 43
2024-01-05 12
2024-01-06 65
2024-01-07 23
2024-01-08 45
2024-01-09 45
2024-01-10 45
2024-01-11 54
2024-01-12 34
I used Generate rows tool to generate the records, but it is generating duplicates. Help me in this regard!
I have attached sample workflow
Solved! Go to Solution.
@BalaBhaskar
We can calculate the Date Diff between current row and next row and use the combination of Generate Rows and Formula tools to do it.
Here is a weekly challenge that is similar with your question.
https://community.alteryx.com/t5/Weekly-Challenge/Challenge-126-Fill-in-the-Date-Gaps/td-p/186140
@BalaBhaskar Another approach
Thanks very much QIU, it worked.