Visokio website     Downloads     Video tutorials     KnowledgeBase  
Automatically selecting latest month in Reports when adding new data - Visokio Forums
Automatically selecting latest month in Reports when adding new data
  •     Steve_Randall June 26, 2009 9:16AM
    Is there any way of setting reports to automatically select the latest month (and ideally the the corresponding month in the previous year) after adding the 'next' months data to the file. At the moment I have to manually 'move on' a series of reports to show the latest data after updating.
    Thanks
    Steve
  • 1 Comment
  •     steve June 26, 2009 9:44AM
    You will need to create a formula field to do this. I've done this using formula functions only available from Omniscope 2.5. You can also achieve the same effect using functions from Omniscope 2.4, if needed, but it is more complicated.

    I've given two examples. Each uses the following sub-expression to combine months+years as a large number of months since 0AD, then subtracts one such value from another:

    DATEUNIT([date], "month") + 12 * DATEUNIT([date], "year")

    You end up with a number 0 to mean "current/latest month", -1 to mean "previous month" and -13 to mean "previous month in previous year". You can then filter on this value to ensure only certain months are showing. Should new data appear in the file, the formulas would re-evaluate.


    First example: months from now

    (DATEUNIT([Date Field], "month") + 12*DATEUNIT([Date Field], "year"))
    -
    (DATEUNIT(TODAY, "month") + 12*DATEUNIT(TODAY, "year"))


    Second example: months from [latest month in data]

    (DATEUNIT([Date Field], "month") + 12*DATEUNIT([Date Field], "year"))
    -
    (DATEUNIT(SUBSET_MAX([Date Field]), "month") + 12*DATEUNIT(SUBSET_MAX([Date Field]), "year"))

Welcome!

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

Sign In Apply for Membership