Visokio website     Downloads     Video tutorials     KnowledgeBase  
Filtering: Record Filters using (variable) dates? - Visokio Forums
Filtering: Record Filters using (variable) dates?
  • VoteVote Up0Vote Down     earheart February 16, 2012 2:39PM
    Is it possible to use a non-static date (today - 365 days) as a filter?
  • 6 Comments
  •     earheart February 16, 2012 2:47PM
    Currently, I am using a field organizer, creating a formula field, and filtering on that.
  •     steve February 17, 2012 2:02AM
    Currently filter rules are entirely static but (as in your workaround) can be applied to dynamic (formula-driven) data. I'm guessing you have a field called something like "Transaction date" and you want to include all transactions in the past year.

    Your workaround, then, is probably something like "Transaction Age" which records the number of days the transaction is 'old'. So 10 Feb 2012 would result in 7. This would be implemented as a formula DATEDIFF([Transaction Date], [Transaction Age], "days") - I may have the arguments the wrong way around. Your filter would then be "Transaction Age < 365".

    What I think you mean is you want to create a filter which operates on the result of a formula, without having to create the additional field. This would have the benefit of reducing the file bulk and memory overhead, but conversely would degrade performance evaluating the filter.

    This could be provided through a filter not backed by a field, but where you configure a formula. Depending on the formula type, you would typically see a slider. The resulting filter rule could be included (and so hidden for a given tab) in named queries, just like with other filters.

    I've reclassified this as an Idea.
  •     earheart February 17, 2012 8:38AM
    Usually if there is a date restriction, I put that in the select block. However, the use case for these is grouping people into recent and not recent buckets for different treatment so I need both in the select. Obviously, the filter option will work, but it does add a layer of complexity.
  •     steve February 17, 2012 9:03AM
    How do you mean, select block? If you want to categorise records, use a Field Org, and add a formula something like this:
    IF(DATEDIFF([Transaction Date], [Transaction Age], "days") < 365, "Recent", "Not recent")
  •     earheart September 25, 2012 1:35PM
    well adding the field org to just add that adds a layer of complexity. I really would love to have some flexibility in the database table block/filter tab. If I could just add today-7 in the filter block, it would really open up functionality. I realize this is an ease of use request and there are ways to accomplish this task, however, i really would like to make pieces like this more easy for end users.
  •     tjbate September 25, 2012 2:11PM
    Stephen - If you are importing from a database, the database source connector has a Filter tab that allows you to specify additional filter critera on incoming data, as well as a custom SQL tab to tune the extracted tabular data set.

    It sounds like you could use a filter option that supported Data/Time and allowed 'less than' and 'greater than' filtr conditions?

    Another aspect of this is parameterising the Database Source blocks to pick up filter values/conditions and SQL statements to apply when an empty/stale IOK template file is launched from a batch file containing the parameters. See here:

    http://forums.visokio.com/discussion/1376

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership