Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data, like -
I want to show the output like:
Month Year | Sales |
Jan-18 | 10 |
Feb-18 | 10 |
Mar-18 | 10 |
Apr-18 | 20 |
May-18 | 30 |
Basically, The date range can be created with master calendar (that's fine), but I need to assign the value of each blank MonthYear with its previous non empty value.
How to do this? Thanks in Advance!!
Hi,
Load the data, create calendar. Create a resident of your original table and construct a new table like below.
noconcatenate
Tab1:
Load *,
if(isnull(Sales),Peek(Sales),Sales) as Sales
Resident Data
order by Date;
Drop Table Data;
Hope this will help.
Regards,
Saniya