Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have monthly data that is submitted by different sites. I would like to carry forward the last non-null value submitted by each site when they have skipped a month. For example, if I have 3 sites (Site A, Site B, and Site C) submitting data for 3 different measures (Data 1, Data 2, and Data 3), it may look something like this:
Site | Date | Data 1 | Data 2 | Data 3 |
A | Jan-19 | 25 | 2 | 10 |
B | Jan-19 | 13 | 2 | 12 |
C | Jan-19 | 1 | 5 | 1 |
A | Feb-19 | 3 | 6 | |
B | Feb-19 | 13 | 2 | 12 |
C | Feb-19 | 2 | 5 | 2 |
A | Mar-19 | 16 | 3 | 6 |
B | Mar-19 | 13 | 2 | |
C | Mar-19 | 2 | 5 | 2 |
A | Apr-19 | 25 | 5 | 17 |
B | Apr-19 | 13 | 12 | |
C | Apr-19 | 2 | 5 | 2 |
How can I get the last reported value for Site A, Data 1, which is 25 from January 2019 to carry forward to February 2019? The same would apply to carrying forward Site B, Data 2 from March 2019 to April 2019, and Site B Data 3 from February 2019 to March 2019.
Thank you.