Visokio website     Downloads     Video tutorials     KnowledgeBase  
Bar/Line View: Displaying flat Average Line? - Visokio Forums
Bar/Line View: Displaying flat Average Line?
  •        benjamin May 18, 2015 12:46PM
    Is there any way to have a line on a bar chart view which just shows the flat average for the period shown ?
    Thanks, Ben
  •     paola May 18, 2015 1:05PM
    This could be achieved by adding a formula field in the Table view (or upstream, in the DataManager), creating the dynamic line that will always be up-to-date, something like
    SUBSET_MEAN([Value], SUBSET([Period])

    If you were to use the same formula inside the Bar/line view, as a measure function, the value would be correct only if you have histogram-type split e.g. Jan-Mar, Apr-June etc.
    as every period will have a different mean, however this will not create a flat line across the chart, while the first option will. Under the Measures menu you should choose the Mean function for this field.

  •        benjamin May 18, 2015 1:11PM
    Hi Paula

    The first idea won work because i want the mean value to update if the user select a wider or narrow date range on the RHS filters on the tab, or indeed if they filter by any other metric on the RHS

    Also i want the average flat across the graph independant of the split.For instance split share price by date i would want the average over the date range rather then the average per day
  •     paola May 18, 2015 2:32PM
    You will need to introduce 2 variables, for start/end dates and use them in the formula field.

    SUBSET2([Date],[Date],[Start date],[End date],">","<"))

    Demo file attached.


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

Sign In Apply for Membership