Hello,
Is there any way in SAS VA to get value from the previous date (one day before), for example from this table:
--------------------------------------------------------
| Date | Company Name | Trx Value | Trx Value D-1 |
--------------------------------------------------------
| 01Jun2016 | ABC | 10,000 | |
| 01Jun2016 | DEF | 11,000 | |
| 01Jun2016 | XYZ | 12,000 | |
| 02Jun2016 | ABC | 33,000 | 10,000 |
| 02Jun2016 | DEF | 44,000 | 11,000 |
| 02Jun2016 | XYZ | 55,000 | 12,000 |
| 03Jun2016 | ABC | 60,000 | 33,000 |
| 03Jun2016 | DEF | 70,000 | 44,000 |
| 03Jun2016 | XYZ | 80,000 | 55,000 |
--------------------------------------------------------
The Trx Value D-1 is New Calculated Item that I would like to get.
Regards,
Karina
Assuming that you mean by VA already loaded data to LASR.
I haven't worked in depth within VA, but since VA is a kind of standardized reporting tool, it works best with normalized/de-normalized data structures.
My guess is you need to fix calculations like this in the data preparation.
Hi Linus,
Thanks for your response.
Ok, the calculation is done in Data Preparation/Data Builder by adding new column, how does the SQL expression or the logic should look like (I attach the form)? I'm bit frustrated here 😕
Kindly enlighten.
Thanks.
Like @LinusH said, put that into the date before loading into VA.
Sort by company and date and use the lag() function.
Is it possible to use Periodic Operators in SAS VA?
I haven't tried it yet.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.