Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

How to Create A DATE Button IN VA which can simply Let you SEE the DATA for Today

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

How to Create A DATE Button IN VA which can simply Let you SEE the DATA for Today

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.


Accepted Solutions
Solution
‎08-29-2016 09:52 AM
Contributor
Posts: 21

Re: How to Create A DATE Button IN VA which can simply Let you SEE the DATA for Today

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


All Replies
Solution
‎08-29-2016 09:52 AM
Contributor
Posts: 21

Re: How to Create A DATE Button IN VA which can simply Let you SEE the DATA for Today

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 338 views
  • 2 likes
  • 1 in conversation