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

Dynamic Date Filters

Reply
New Contributor
Posts: 2

Dynamic Date Filters

Are there dynamic date filters in SAS VA 6.3 now? Also is there a 6.3 Video Library?

SAS Employee
Posts: 38

Re: Dynamic Date Filters

Hi Ben,

Just noticed your question was not answered.  Could you confirm that by dynamic date filters, you are referring to filters such as today, this month, previous 90 days, etc.?  Would these filters be defined once only by the report author or do you need a way for report consumers to change them in a filter control on the report?

Thanks,

Rick Styll

N/A
Posts: 1

Re: Dynamic Date Filters

Rick-

I am looking for the same option -- my users are not fond of the slider bar/calendar pick-the-date for date filters.  They asked for things like today, last week, last 30 days, last 60 days, etc.  Are those even possible?

Thanks,

Mere

SAS Employee
Posts: 85

Re: Dynamic Date Filters

Mere and Ben,

Here is an example of how a filter for the last 30 days using 'VA_Date' as a Datetime category:

TreatAs(_Date_, ( TreatAs(_Number_, 'VA_Date'n) / 86400 )) >= TreatAs(_Date_, ( ( TreatAs(_Number_, Now()) / 86400 ) - 30 ))

Replace the 'VA_Date' value with your category name.

Updating the last numeric value will allow you to base this filter on the filtering criteria 'last 60 days', 'last 90 days', etc.

-shawn

SAS Employee
Posts: 38

Re: Dynamic Date Filters

In the next release of Visual Analytics, you are able to substitute 30 in Shawn's filter expression above with a parameter using the designer.  Report consumers can then select the number of days to subtract from now using an on-report control that modifies the parameter's value, such as a slider.  As a report author, you can specify a default value, minimum, and maximum for numeric parameters as well in Visual Analytics 7.1.

Rick Styll

Frequent Contributor
Posts: 85

Re: Dynamic Date Filters

Hi Rick,

came across couple of situation where I was asked whether model validation is possible in VA Explorer (for banking, insurance in specific). Is there any thing coming up in near future like integration of SAS RPM with VA in next release?

satlr

Occasional Contributor
Posts: 6

Re: Dynamic Date Filters

Thank you Rick, I was able to utilize the formula 'skillman' gave with the hardcoded variance and, separately, the parameter method.

Additionally, I am working on creating a formula that would determine the number of days needed to subtract to get the current time frame and specific previous time frame aggregates (example, current month and all of previous month).

That way one would not have to change the parameter to alter the number of days being subtracted.

Contributor
Posts: 31

Re: Dynamic Date Filters

Hi ,

I use the code below to extract teh value for last 30 days, but when I use this in calculated Item, It gives me an error message stating: Type mismatch:expected typr at this location is Datetime, type of item being applied is Boolean.

Please let me know if I am doing something wrong. For my report I need to have filter/button that extracts the data for last 30 days from the entire dataset.

 

Thanks!

Regular Contributor
Posts: 172

Re: Dynamic Date Filters

Hi,

try this one, where "Trans.Date"  is the variable of your transactions.

Filtering the object on this calculated item being 1 would do the job.

Greetings  Peter

27-12-2015 15-02-01.png

Contributor
Posts: 31

Re: Dynamic Date Filters

Hi Peter,

Thanks I am able to use this filter now.

However I have one more question. How to use the code above for the date format like "1January 2016". I am able to use for datetime , but not able to do it with the above format.

 

Regards,

Abhi

Regular Contributor
Posts: 172

Re: Dynamic Date Filters

Hi Abhi,

please confirm that 1januari2016 is a text and not a format for your date.

if this is a text, shurely there must be a way to transform it into a real date.

if it is a date, then it should work like mentioned above.

if it is a text, I will try to find a way to translate it within SAS VA to a real date.

 

Best would be to have a the date already before importing the data into SAS VA.

 

Greetings  Peter

SAS Employee
Posts: 85

Re: Dynamic Date Filters

BenLangsam,

There is a video library which can be accessed from within VA version 6.3. In the help drop down you will see a link for videos which will take you to the support.sas.com site:

SAS Visual Analytics, SAS LASR Analytic Server, and SAS Mobile BI

-shawn

Post a Question
Discussion Stats
  • 11 replies
  • 3318 views
  • 11 likes
  • 8 in conversation