I have a table like below, where a new record is created when there is a change in the status of a task.
task | status | last update |
---|---|---|
A | 1 | 28/04/2022 |
A | 3 | 01/05/2022 |
A | 5 | 05/05/2022 |
B | 1 | 28/04/2022 |
B | 3 | 03/05/2022 |
B | 4 | 05/05/2022 |
The problem is that I need to plot a graph within a time range, where I know the status of each item regardless of the date it was changed/created. With that, I think the easiest is to transform to the table below:
task | status | last update |
---|---|---|
A | 1 | 28/04/2022 |
A | 1 | 29/04/2022 |
A | 1 | 28/04/2022 |
A | 1 | 29/04/2022 |
A | 1 | 30/04/2022 |
A | 3 | 01/05/2022 |
A | 3 | 02/05/2022 |
A | 3 | 03/05/2022 |
A | 3 | 04/05/2022 |
A | 5 | 05/05/2022 |
B | 1 | 28/04/2022 |
B | 1 | 29/04/2022 |
B | 1 | 30/04/2022 |
B | 1 | 01/05/2022 |
B | 1 | 02/05/2022 |
B | 3 | 03/05/2022 |
B | 3 | 04/05/2022 |
B | 4 | 05/05/2022 |
However, I can't think of a way to do it, either directly in Power BI or even in SQL, since I'm connecting to a redshift database through a sql query. Could you please help me? Thanks