Forum Discussion

powerjey's avatar
powerjey
Helper I
4 years ago
Solved

How to dynamically compare two columns in a Waterfall chart?

Hi everyone,   Hoping a Power BI expert can help me out with this problem.  See attached for an example pbix file. https://drive.google.com/file/d/1QctBxMhENNiEE0XndtLQenXwsaif4zm5/view?usp=sharin...
  • jdbuchanan71's avatar
    4 years ago

    powerjey 

    I got soemthing simple that is along the lines of what you are looking for I think.

     

    First Forecast = 
    VAR _fc = MIN ( Sheet1[Forecast] )
    RETURN
    CALCULATE( SUM ( Sheet1[Qty] ), Sheet1[Forecast] = _fc )
    Second Forecast = 
    VAR _fc = MAX ( Sheet1[Forecast] )
    RETURN
    CALCULATE( SUM ( Sheet1[Qty] ), Sheet1[Forecast] = _fc )

     

    I also made a measure to use as the title of the chart.

     

    Forecast Title = 
    VAR _First = MIN ( Sheet1[Forecast] )
    VAR _Second = MAX ( Sheet1[Forecast] )
    RETURN _First & " to " & _Second