Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two fields- Month and Sales. I have been trying to write the QlikView script for the following scenario:
If for a month, the Sales value is 0, then the previous month's value should flow into it. For example if the Sales for the month June is 0, then the previous month i.e. May Sales value should flow into it.
I have attached the excel file FYR.
Hi @ritvik4BI , please try this :
LOAD
Month,
if( Sales = 0, previous(Sales), Sales) as Sales
FROM [..\Downloads\Scenario101.xlsx] (ooxml, embedded labels, table is Sheet1);
This is the basic example, with previous function ,
Take care about your data types for ensure correct results, and about order logic too.
greetings!