Submitted on September 4, 2018 at 07:02 PM
Expires on September 4, 2019 at 07:02 PM (2 months from now)

New Paste 1 (Text)

KPI = 
VAR MessageText = ""
VAR Radius = 9
VAR Colour = "blue"
VAR Opacity = 0.75
VAR SVG_Neutral = "data:image/svg+xml;utf8,"
    & "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='20'>"
    & "<circle cx='25' cy='10' r='"
    & Radius
    & "' fill='"
    & Colour
    & "' fill-opacity='"
    & Opacity
    & "' />"
    & "</svg>"
VAR SVG_UP = "data:image/svg+xml;utf8,"
    & "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='20'>"
    & "<polygon points=""05,20 45,20 25,1"" style=""fill:green;stroke:green;stroke-width:0;fill-rule:evenodd;"" />"
    & "</svg>"
VAR SVG_DN = "data:image/svg+xml;utf8,"
    & "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='20'>"
    & "<polygon points=""05,1 45,1 25,20"" style=""fill:red;stroke:red;stroke-width:0;fill-rule:evenodd;"" />"
    & "</svg>"
RETURN
    SWITCH (
        TRUE (),
        SUM ( Sales[Sales] ) > 215, SVG_UP,
        SUM ( Sales[Sales] ) < 50, SVG_DN,
        SVG_Neutral
    )