Forum Discussion
Combo Chart in Power Bi
- Anonymous2 years ago
HI RekhaS,
The default color formatting feature seems not suitable for your request, perhaps you can refer to the following steps if it helps:
1. You can create a unconnected table with three groups. (Actual, forcast1, forcast2)
2. Create a line and stacked column chart with raw table date on x axis, new table group field on column y-axis, Tagert field at the line y-axis. and write a measure formula to redirect to different result based on current value.dynamic result = VAR currGroup = SELECTEDVALUE ( 'Category'[Group] ) RETURN IF ( [Actual] > 0, SWITCH ( currGroup, "Actual", [Actual], "Forecast1", 0, "Forecast2", 0 ), SWITCH ( currGroup, "Actual", 0, "Forecast1", [Forecast1], "Forecast2", [Forecast2] ) )3. setting these data bar colors.
Regards,
Xiaoxin Sheng
Hi RekhaS ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
- RekhaS2 years agoRegular Visitor
Hi Xiaoxin,
Attaching a sample data where i have to show the Gap% above the line chart(Target) and Green Bar(Actual) and Orange+Blue(Forecast1+Forecast2) with showing downward & upward triangles for +ve and -Ve values accordingly and labels i have to show for all the metrics
- Anonymous2 years agoNot applicable
HI RekhaS,
The default color formatting feature seems not suitable for your request, perhaps you can refer to the following steps if it helps:
1. You can create a unconnected table with three groups. (Actual, forcast1, forcast2)
2. Create a line and stacked column chart with raw table date on x axis, new table group field on column y-axis, Tagert field at the line y-axis. and write a measure formula to redirect to different result based on current value.dynamic result = VAR currGroup = SELECTEDVALUE ( 'Category'[Group] ) RETURN IF ( [Actual] > 0, SWITCH ( currGroup, "Actual", [Actual], "Forecast1", 0, "Forecast2", 0 ), SWITCH ( currGroup, "Actual", 0, "Forecast1", [Forecast1], "Forecast2", [Forecast2] ) )3. setting these data bar colors.
Regards,
Xiaoxin Sheng
- RekhaS2 years agoRegular Visitor
Thanks Xiaoxin, but the difficulty i am facing is with Gap% from Target which needs to be shown above the line as Up and Down triangles with -ve and +ve value Gap% value. I have already created the above graphh you have shared. Need help on the Triangle icons on line