Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how do i get previous date value of yesterday on my pivot or straight chart

See attached

6 Replies
sinanozdemir
Specialist III
Specialist III

Something like this:

Capture.PNG

effinty2112
Master
Master

Try this which creates a field in the load script:

TempData:

LOAD Date(Date) as Date,

     LT,

     [Net val]

FROM

Book2.xlsx

(ooxml, embedded labels, table is Sheet1) ;

NoConcatenate

Data:

LOAD

if(LT = Previous(LT),Previous([Net val]),0) as [Previous Net val],

* Resident TempData Order by LT, Date;

DROP Table TempData;

This is the table produced:

Date LT Net val Previous Net val
30/10/2015LT 3000
30/10/2015LT 31672360
01/11/2015LT 3000
01/11/2015LT 31067236
02/11/2015LT 3000
02/11/2015LT 3100
03/11/2015LT 3000
03/11/2015LT 3100
04/11/2015LT 3040820
04/11/2015LT 3140820
05/11/2015LT 30109364082
05/11/2015LT 31109364082
06/11/2015LT 302241210936
06/11/2015LT 312241210936
07/11/2015LT 30022412
07/11/2015LT 31022412
08/11/2015LT 30268100
08/11/2015LT 31268100
09/11/2015LT 302747926810
09/11/2015LT 312747926810
HirisH_V7
Master
Master

Hi,

Check this,

Today and previous day.PNG

Check out attached,

Thanks ,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
tamilarasu
Champion
Champion

Hi,

You can also try the below method,

Capture.PNG

Anonymous
Not applicable
Author

Make a Variable 'vPreviousDate' =max(date)-1

further call this variable using set analysis like.

Sum({<CalendarDate={'$(vPreviousDate)'}>}Amount)

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Like this?