Conditional Performance Indicators in Tables using HTML Unicode Chr() Values

    Inserting KPI indicators into tables is actually quite simple if you understand the HTML Unicode UTF-8 characters that are available for you to use and display with simple if conditions. These characters behave like any other text so applying conditional colors is very simple.

     

    Some examples, an example application and a link to many character options are at the bottom of this post.

     

    Setting up the Measure

    The measure needs to be a simple if statement, for example:

    if([Sales This Year]>[Sales Last Year],chr(9650),chr(9660))

    Where 9650 and 9660 are the triangle up and down character codes based on standard HTML Unicode UTF-8 charsets.

     

    Setting up the conditional colours

    Under Text color Expression use an if statement to switch the colours similar to the measure expression, for example:

    if([Sales This Year]>[Sales Last Year],rgb(0,220,0),rgb(255,0,0))

     

    pic5.jpg


    Note:

    I have used the field names of the columns in the table to create these expressions rather than repeat the measure expression by wrapping the field label in square brackets (as you will most likely know as of version 3.2 we can not reference the Master Items here). For this method to work both fields must be visible in the table.

     

     

    Straight table example

    pic7.jpg

    pic2.jpg

     

     

    Pivot table example

    pic6.jpg

    Pic1.jpg

     

     

     

    Example Characters and codes can be found here, there are many different groupings with this link taking you to the Geometric shapes.

     

    Some useful Characters and codes are below:

     

     

    Character CodeCharacter DescCharacter
    9604LOWER HALF BLOCK
    9605LOWER FIVE EIGHTHS BLOCK
    9606LOWER THREE QUARTERS BLOCK
    9607LOWER SEVEN EIGHTHS BLOCK
    9608FULL BLOCK
    9609LEFT SEVEN EIGHTHS BLOCK
    9610LEFT THREE QUARTERS BLOCK
    9611LEFT FIVE EIGHTHS BLOCK
    9612LEFT HALF BLOCK
    9613LEFT THREE EIGHTHS BLOCK
    9632BLACK SQUARE
    9650BLACK UP-POINTING TRIANGLE
    9658BLACK RIGHT-POINTING POINTER
    9660BLACK DOWN-POINTING TRIANGLE
    9668BLACK LEFT-POINTING POINTER
    9679BLACK CIRCLE
    9680CIRCLE WITH LEFT HALF BLACK
    9681CIRCLE WITH RIGHT HALF BLACK
    9682CIRCLE WITH LOWER HALF BLACK
    9683CIRCLE WITH UPPER HALF BLACK
    9684CIRCLE WITH UPPER RIGHT QUADRANT BLACK
    9685CIRCLE WITH ALL BUT UPPER LEFT QUADRANT BLACK
    9698BLACK LOWER RIGHT TRIANGLE
    9699BLACK LOWER LEFT TRIANGLE
    9700BLACK UPPER LEFT TRIANGLE
    9701BLACK UPPER RIGHT TRIANGLE
    9733BLACK STAR
    9734WHITE STAR
    9745BALLOT BOX WITH CHECK
    9746BALLOT BOX WITH X
    9754BLACK LEFT POINTING INDEX
    9755BLACK RIGHT POINTING INDEX
    9785WHITE FROWNING FACE
    9786WHITE SMILING FACE
    9787BLACK SMILING FACE
    9829BLACK HEART SUIT
    9830BLACK DIAMOND SUIT
    9872WHITE FLAG
    9873BLACK FLAG
    9898MEDIUM WHITE CIRCLE
    9899MEDIUM BLACK CIRCLE
    9940NO ENTRY
    9978TENT
    9989WHITE HEAVY CHECK MARK
    9995RAISED HAND
    10003CHECK MARK
    10004HEAVY CHECK MARK
    10005MULTIPLICATION X
    10006HEAVY MULTIPLICATION X
    10007BALLOT X
    10008HEAVY BALLOT X
    10009OUTLINED GREEK CROSS
    10010HEAVY GREEK CROSS
    10011OPEN CENTRE CROSS
    10026CIRCLED WHITE STAR
    10060CROSS MARK
    10062NEGATIVE SQUARED CROSS MARK
    10067BLACK QUESTION MARK ORNAMENT
    10068WHITE QUESTION MARK ORNAMENT
    10069WHITE EXCLAMATION MARK ORNAMENT
    10070BLACK DIAMOND MINUS WHITE X
    10071HEAVY EXCLAMATION MARK SYMBOL