Forum Discussion

RekhaS's avatar
RekhaS
Regular Visitor
2 years ago
Solved

Combo Chart in Power Bi

Hi Folks,   I am new to powerBi Forum as well as to the application, and like to get help as much as possible to understand the tool. I have a requirement where i have to show a cluster Chart whic...
  • Anonymous's avatar
    Anonymous
    2 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