Visokio website     Downloads     Video tutorials     KnowledgeBase  
content view - functions - Visokio Forums
content view - functions
  • TimS June 16, 2009 4:12PM
    Hi,

    If I want to enter a formula into the comment field, so that I can say x metric is % vs. last period. How would I go about entering this formula? I have one column in my dataset that contains all my values -so I thought I could filter this column to contain only the values I want to sum over, and then look at the difference between this period and another period. My problem is that I can't find any information about how to structure these formulas (i.e. include subtraction and division), and what options are available.

    Tim
  • 5 Comments
  •     steve June 17, 2009 5:14PM
    Tim,

    The content view is a new view which we've yet to build out fully. As such you can insert functions (e.g. sum of a field) using the Insert button, but there's no user-friendly way of entering/editing custom formulas. Inserting custom formulas is an undocumented feature of the content view.

    I suggest you use the Formula editor to edit a formula. In 2.5, go to Data menu > Formulas > Add formula field. Edit the formula in the window that appears, which provides tooltips over your formula text, and help with functions. When you've finished and there are no errors, copy the text, cancel, go back to the Content view. Edit and insert an arbitrary function, then replace the appropriate text by pasting your formula.

    Once you are comfortable with formulas, you can enter them directly in the Content view. In future you'll be able to insert formulas directly using the formula editor.

    I'm not sure if you're going to be able to achieve the effect you want, though. Formulas in the content view are evaluated against the filtered data, not all data, so you can't compare the filtered data with some other data. We'd need to develop this if it was in demand, and for each formula element you would need some way of specifying which data subset to use.

    Instead, perhaps you can use a formula field and the SUBSET functions to evaluate, for each record, how its group compares to a previous group of records.

    Steve
  •     steve June 17, 2009 5:18PM
    See also:
    http://www.visokio.com/functions-guide
    http://www.visokio.com/kb/subset-functions
  • TimS June 22, 2009 7:44AM
    Thanks Steve. I think I will be able to use this.

    I need to use a couple of functions - and have found the ones I want, but can't find an explanation of how to manipulate the subset field that is required for most formulas. In most cases I will want to calculate the formula on the data that a chart is currently based on (which in nearly every case is the filtered data intersected with a query) - can I do this?

    Many thanks

    TIm
  •     steve June 22, 2009 8:47AM
    SUBSET(...) allows you to isolate a subset of data based typically upon the current record being evaluated. Does the syntax of this function need some explanation?

    In nearly all cases, formulas are calculated upon the full dataset, before filtering. Once evaluated, they behave as static values as if you had imported them from a flat file. When you filter, you are filtering those values, and not re-calculating.

    One exception to this is when you embed mini formulas within the Content view in 2.5.

    In a future version, we plan to support calculation of formulas at the subset level, as an optional setting. In each view, if you were to filter and/or select a named query, you would see a view of the data where the formulas had been recalculated.

    This is in fact currently possible in 2.5 by "hacking" the aggregation function in Omniscope, but isn't the intended use of aggregation and is somewhat awkward to set up. Configure your formulas as normal, and verify they calculate correctly for all (unfiltered) data. Then, in a particular view where you are showing filtered data and/or a named query, open the Aggregation drop-down and tick a field which is entirely unique. Aggregating using "unique values" by a unique field has no effect on your data; all other fields should show the singleton value by default. Then, in the same drop-down, pick "Formula result" for your formula fields. The reason this works is that when you have aggregated data, Omniscope provides the option to calculate formulas for aggregated data, and since aggregation happens upon the view's filtered data, you get the desired result.

    Steve
  • TimS June 22, 2009 9:41AM
    Thank you - that works - great tip.

Welcome!

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

Sign In Apply for Membership