Jump to content

Filter range of dates on marking in second table.


Michiel Boswijk

Recommended Posts

I have 2 tables: Table A and Table B.

In both tables I have a date columns, let's call them dateA and dateB.

Now I would like to click a row in table A (so a marking), and then filter a range of datesin Table B.

More specifically, if dateA is for instance 2020-01-30, I want to select from N months (12 in my case) in the past until dateA in dateB/Table B.

So in the example I would select/filter all rows in table B from 2019-01-30 - 2020-01-30.

 

It did not work using table relations since those are exact matches.

I also tried using 'limit data using expression' in Table B, but I can't access the marked value of Table A in that expression.

Link to comment
Share on other sites

You can refer to this article to retrieve the marking selection from tableAin a document property:

https://community.spotfire.com/wiki/how-retrieve-data-marking-selection-using-ironpython-tibco-spotfire

Once it is done, you can do 'limitdata using expression' in tableB by using the same document property:

[Date_column] >= dateadd('mm',-12,Document.Properties["yourDocumentPropertyControl"]) AND

[Date_column]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...