Forum Discussion
Waterfall Challenge
Thankyou, johnbasha33 for your response.
Hi majid154a,
Thankyou for the followup.
As you mentioned, you want to create a Waterfall Chart where the Budget category to appear in gray color, not green or red and you want it to be the first bar on the left side.
Based on my understanding, please follow the below steps which might help to resolve the issue:
1. We have created a sample data as shown in the below screenshot:
2.Created Running Total, WF End and WF Start measures.
3. Imported Deneb chart (custom visual) , from AppSource. Please refer below screenshot:
4. Click on the edit option and drag required fields.
5. Remove the existing sample json code and replace with the below json code.
6. Refer below json code.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "dataset"},
"transform": [
{"calculate": "datum.cat == 'Budget NPAT' ? 'Budget' : (datum.value >= 0 ? 'Increase' : 'Decrease')", "as": "Type"}
],
"mark": {"type": "bar"},
"encoding": {
"x": {
"field": "cat",
"type": "ordinal",
"sort": {"field": "index"}
},
"y": {
"field": "WF Start",
"type": "quantitative"
},
"y2": {
"field": "WF End"
},
"color": {
"field": "Type",
"type": "nominal",
"scale": {
"domain": ["Budget", "Increase", "Decrease"],
"range": ["#808080", "#00B050", "#C00000"]
},
"legend": {"title": "Type"}
},
"tooltip": [
{"field": "cat", "type": "nominal"},
{"field": "value", "type": "quantitative", "format": ",.0f"}
]
}
}
click on apply changes button.
7.Refer below output screenshot and attached .pbix file:
Note: Power BI does NOT support field value conditional colors for Waterfall charts, it is a limitation. By using Deneb custom visual you can get the desired result.
We hope this information helps to resolve your issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.
Thank you.
Dear v-pnaroju-msft
Thank you very much for the solution you provided. After testing it myself, I confirmed that it works correctly. I truly appreciate your efforts and support.There is one remaining point I would like to address. As shown in the attached image, I would like to make the following changes:
Hide the values highlighted in the green box.
Change the values in the orange box to be horizontal instead of vertical.
Display the data labels (numbers) on the category values.
Waiting for Your answer and feed back