Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous Month Sales in Script

Hi All,

I have an requirement to add Previous Month Sales in the Total Sales . Total Sales is Last Plan Sales +Previous Month Actual Sales . I was calculating all of this in Qlikview Script.  In my table two dates field are present such as Calendar Year ,Calendar-YearMonth having Value Like 201701,201702,201703 and so on. So, I want to find out previous month Sales so I can add it and calculate Total Sales .

Please provide me any Idea to achieve this . Thanks in advance !!

Regards

Deepak

Labels (1)
1 Reply
aarkay29
Specialist
Specialist

something like this

Load *,

if(Isnull(peek(Sales)),0,peek(Sales))+Sales as TotalSales;

Load * Inline [

Calendar-YearMonth,Sales

201701,250

201702,350

201703,450

201704,550

];