SAS Visual Analytics

Dashboards, reports, BI and analytics - all from a single interface.
BookmarkSubscribeRSS Feed
FilipJ
Calcite | Level 5

Hello

How do I get the difference in numbers between two dates?

I have tried using "Difference fro previous period", but It does not work with days?

Please look at Excel spreadsheet column "C"

Thanks

 

4 REPLIES 4
LinusH
Tourmaline | Level 20
If you just want straight no of days just use minus.
Data never sleeps
Kurt_Bremser
Super User

SAS stores dates as counts of days (from a given starting point, which is 1960-01-01). The difference in days between two dates can therefore be calculated with a simple subtraction.

FilipJ
Calcite | Level 5
Thanks,

I am very new to SAS va, could you show how?
FredrikE
Rhodochrosite | Level 12

I have not got it to work in 7.4 but in 8.2 it works by using relative period and set offset to -1 and using "Inherit".

It works with days, but if you have a gap between the days you will get a missing value.

//Fredrik

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 4 replies
  • 2372 views
  • 0 likes
  • 4 in conversation