Forum Discussion
powerjey
4 years agoHelper I
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...
- 4 years ago
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
jdbuchanan71
4 years agoSuper User
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
- powerjey4 years agoHelper I
Thank you so much! Very elegant and simple solution. I've learned something new today.
Appreciate it 🙂