Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Variance chart help

Hi All, I need a help in variance chart. Customer is asking for the first visualization and i was able to produce the 2nd one with the custom visualization "Barchart with relative variance". The problem with it or any other variance chart i am using is the variance isn't being calculated the way customer is wanting. Customers variance formula is variance=(forecast+Actual)- target. and the visualiation should ideally contain two vertical lines(target and forecasted) and one bar (actual). if the variance is negative, text should be red and if positivem text should be green

 

 

 

Customer Askpbi custom visual

FYTargetActual BilledForecast to BillVariance
21-22235,00050,000142,000-43,000

4 Replies

  • This looks like a great opportunity for you to learn about the Deneb visual.

    • PBIdashboards's avatar
      PBIdashboards
      Icon for Post Patron rankPost Patron

      The Deneb suggestion works for the custom chart visual. For the table/matrix side of the same report (showing the variance numbers per vendor alongside the chart), Flexa Tables on AppSource might be simpler, it supports custom variance formulas and conditional formatting (red/green) as built-in options without custom Vega specs.

      If the goal is purely the chart visual, Deneb is the right tool. If you also need a variance table that Finance users can explore themselves, Flexa Tables is worth a look. Search "Flexa Tables" on AppSource.

  • Try creating a separate DAX measure for the customer formula:

    Variance = (Forecast + Actual) - Target

    Then use that measure for conditional formatting (negative = red, positive = green). A combo chart with target/forecast as lines and actual as bars may fit the requirement better than the built-in variance visuals.

  •  

    The issue is probably not the visual itself but the variance logic. Most Power BI variance visuals expect something like Actual - Target, so they won’t calculate the way your customer wants.

    Create a separate measure for the customer’s formula:

     

     
    Variance = ([Forecast] + [Actual]) - [Target]
     

     

     

    Then use conditional formatting for the variance text:

     

     
    Color = IF([Variance] < 0, "Red", "Green")
     
     

    For the layout, a combo chart can get close (Target + Forecast as lines, Actual as bars). If you need exactly two vertical markers and a single actual bar with dynamic colored variance text, you’ll likely need a custom visual like Deneb because standard visuals have limitations.