Visokio website     Downloads     Video tutorials     KnowledgeBase  
Date/Time: Custom "smart labelling" - Visokio Forums
Date/Time: Custom "smart labelling"
  • nash July 16, 2014 4:57AM
    My data have a data field with the years 2011, 2012, 2013 on a monthly base (Jan - Dec) and the first six months in 2014.

    I want to show the spendings on the year base in the bar/line view, so I split on the date field and take the interval “1 Year”.
    The result is that the bars are labeled by year and it is not clear that the year 2014 is not a full year.

    My question is, if a custom labeling is possible? For example "2014 ytd" or Min and Max Values of this year: "01.2014-06.2014"

  •     paola July 16, 2014 5:39AM
    If you have [Year] field formatted as date, create a duplicate e.g. [Year (2)] and format it as category.
    Then you can add a formula field to your dataset to create either simple or more detailed label:
    IF([Year (2)]="2014",
    "2014 ytd",

    IF([Year (2)]="2014",
    DATETOTEXT(SUBSET_MIN([Date], SUBSET([Year (2)],"2014")), "MM.yyyy")
    +" - "+
    DATETOTEXT(SUBSET_MAX([Date], SUBSET([Year (2)],"2014")), "MM.yyyy")
    [Year (2)])

    Note: if you use [Year (2)] for labelling, you might have to re-arrange the order (now the values will not be sorted in chronological, but alphabetical order). Go to Data>Manage fields>Field options>value order... and drag the values to create order.
  • nash July 18, 2014 7:10AM
    Thanks a lot! It works
This discussion has been closed.
← All Discussions


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

Sign In Apply for Membership