jedge
jedge

Reputation: 1047

Spotfire - Adding dynamic date restriction to data table which is based on an information link. Spotfire 6.0.1

I have an information link that I want to restrict in spotfire when I add it as a data table so that certain data is excluded. I want to restrict column 'DAY' to the past 91 days.

These are the steps I have tried that haven't worked:

  1. Added data table and clicked 'load on demand' (in the 'Add Data Tables' window) and then 'settings'
  2. On the 'DAY' column, clicked 'Define Input'
  3. Chose 'Range(fixed/properties/expression)' as the 'Input' for the selected parameter
  4. Then as the 'expression' for the 'Min', used: DateAdd('dd',-91,DateTimeNow())

It returns an error when I try to add a transformation to the data or just returns no data when I add the data table. If I just restrict the data with a fixed value it works as expected but clearly this would mean that I would need to change the restriction everyday. I have also been able to restrict the data to a static date directly on the information link under the 'Filters' heading. What I really need is a dynamic restriction that is placed on in some way, in Spotfire, rather than directly on the data source (Oracle).

Would be grateful for any help! Thanks!

Upvotes: 2

Views: 3059

Answers (1)

Chelsea
Chelsea

Reputation: 511

It couldn't recognize DateTimeNow(), which is a DateTime as a Date. Spotfire gets kind of picky about that sort of thing. Replace the Expression used for Min with

DateAdd("dd",-91,Date(DateTimeNow()))

and it should work.

Upvotes: 3

Related Questions