Visokio website     Downloads     Video tutorials     KnowledgeBase  
Formulae: New extensible SUBSET function syntax - Visokio Forums
Formulae: New extensible SUBSET function syntax
  •     steve April 19, 2011 10:23AM
    The SUBSET function has now been complemented in recent 2.6+ builds by:

    - INTERSECTION - http://www.visokio.com/functions-guide#INTERSECTION
    - UNION - http://www.visokio.com/functions-guide#UNION
    - INVERSE - http://www.visokio.com/functions-guide#INVERSE

    These greatly improve the simplicity, flexibility and power of subsets in formulas. They replace the complicated SUBSET2, SUBSET3 (etc.) functions, and more. Instead of these, use INTERSECTION(SUBSET(...), SUBSET(...), SUBSET(...)).

    Examples:
    The sum of Sales for all records with a different currency to the current record:
    SUBSET_SUM( Sales, INVERSE(SUBSET(Currency)) )

    The number of records with yield < 0.1 and in USD or GBP:
    RECORDCOUNT(INTERSECTION(
    UNION(SUBSET(Currency, "USD"), SUBSET(Currency, "GBP")),
    SUBSET(Yield, 0.1, "<")<br />))


    See Subset Functions Guide: http://www.visokio.com/kb/subset-functions
  • 6 Comments
  •     toes April 20, 2011 9:50AM
    Hi Steve,

    do we have to re-write functions using the subset2,3,4,.. syntax or is this syntax still supported? And for how long?

    Thanks
    Thomas
  •     steve April 20, 2011 11:46AM
    SUBSET2, etc. have only been deprecated. Deprecated functions are supported indefinitely. Deprecating just means they aren't the recommended approach and aren't listed in the function lookup.
  •     steve May 5, 2011 7:44AM
    Update: performance of INTERSECTION is worse than the equivalent SUBSET2+ functions. We have un-deprecated the SUBSET2+ functions until this can be addressed in 2.7.
  •     Mashup June 22, 2012 2:21PM
    Hi Steve,
    Subset functions used to be based upon the data you had selected. Is this no longer the case, as a Subset_Sum calc i am doing seems to be calculating based upon all the data in the file not just the records i selected
    Thanks
    Phil
  •     steve June 25, 2012 11:16AM
    There's been no change to the way SUBSET functions are applied.

    Formulas are calculated for all data. The exceptions are:
    - when using a view's Aggregate menu, and choosing "(Formula result)"
    - when using formulae in the content view, and other rich text places
    - when using Formula measures in the bar/line view.
  •     steve October 22, 2012 8:35AM
    INTERSECTION performance is now resolved in 2.8 - alpha partners see here:
    http://forums.visokio.com/discussion/1849/formula-improvements-2.8

Welcome!

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

Sign In Apply for Membership

Tagged