Forum Discussion

crainaud's avatar
crainaud
Frequent Visitor
4 years ago
Solved

KPI Tabular Editor color switch based on product

Hi, I have set up my KPIs using Tabular Editor.  Generally an increase over target is a positive or "green" but I have one item where it should be "red".   In the example below, I've actually used ...
  • crainaud's avatar
    crainaud
    4 years ago

    Hi -

    Happy to report by studying an Enterprise DNA sample file, I figured out a switch measure that works for this situation.  The variance calculation is based on the specific metric that appears in the table visual.

     
    MTD Var by Metric =
    VAR CurrentItem = SELECTEDVALUE(Metrics[Metric] )

    RETURN
    SWITCH( TRUE(),
    CurrentItem = "Net MWh", [MTD Var],
    CurrentItem = "A Steam Klbs", [MTD Reverse Var],
    CurrentItem = "B Steam Klbs", [MTD Var])
    By using two difference variance measures; MTD Reverse Var (target - actual) and MTD Var (actual - target) I was able to create the Tabular Editor KPI to display the correct colors using the final measure MTD Var by Measure.

    Yalan Wu, thanks for the follow-up!