Forum Discussion

daniellamoore29's avatar
2 years ago
Solved

Gauge visual conditional formatting

Hi, I have a table with   1. 'target deadline' which is the overall financial year target i.e., 500 for the 4 quarters 2. 'Target' for each quarter i.e., 125 every quarter 3. 'Metric value' for e...
  • Greg_Deckler's avatar
    2 years ago

    daniellamoore29 Try this. PBIX is attached below signature.

    Measure = 
        VAR __Target = SUM('Table'[Target])
        VAR __Metric = SUM('Table'[Metric Value])
        VAR __Variance = SUM('Table'[Variance Threshold])
        VAR __Result =
            SWITCH( TRUE(),
                __Metric < __Variance, "Red",
                __Metric < __Target, "Yellow",
                "Green"
            )
    RETURN
        __Result