BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
maverickkub
Obsidian | Level 7

Hi.

 

I am supposed to create a Button for Customer which can auto refresh the entire DATA based on the present DAY.

Something like stated in the picture below.sas1.png

 

 

This can easily be done with the NOW() function but now the issues is the data should be less on day from the present Day. i.e. in this case 28th August 2016.

How to achieve this?

how to get a date less than the present Date.

1 ACCEPTED SOLUTION

Accepted Solutions
maverickkub
Obsidian | Level 7

So I found the Answer Myself!!!

 

Step I:    Create a Now() field from the data.This would auto populate today's Date.

 

Step II: Create a new calcualted Item.Using Treat as fucntion and Datepart function change the Now data field to Number and Subtract the number of days you want from it as shown below:

sas2.png

 

 

 

 

Step III: USing this calucated Item crete another calculated item and again use this numeric data to chage into date itme for this time as shown below:

 

 

 

sas3.png

View solution in original post

1 REPLY 1
maverickkub
Obsidian | Level 7

So I found the Answer Myself!!!

 

Step I:    Create a Now() field from the data.This would auto populate today's Date.

 

Step II: Create a new calcualted Item.Using Treat as fucntion and Datepart function change the Now data field to Number and Subtract the number of days you want from it as shown below:

sas2.png

 

 

 

 

Step III: USing this calucated Item crete another calculated item and again use this numeric data to chage into date itme for this time as shown below:

 

 

 

sas3.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1066 views
  • 2 likes
  • 1 in conversation