Clustered Column chart in Power BI IBCS

Clustered Column chart in Power BI IBCS

·

2 min read

In this article I have mentioned about the learnings involving Column chart in power BI.

Get Data

Month Number , Month , 2022 , 2023 ,2023 Predictions
1 , January , 2825.00 , 7140.00 , 
2 , February , 5005.00 , 1614.00 , 
3 , March , 3612.00 , 14752.00 , 
4 , April , 2978.00 , 933.00 , 
5 , May , 8662.00 , 6343.00 , 
6 , June , 4750.00 , 8223.00 , 
7 , July , 4433.00 , 6953.00 , 
8 , August , 2062.00 , 9041.00 , 
9 , September , 9329.00 , 10992.00 , 
10 , October , 16243.00 , 9275.00 , 
11 , November , 4011.00 ,  , 9690.10
12 , December , 17885.00 ,  , 8483.35

Measures

DEFINE
    MEASURE 'IBCS data'[PY] = SUM('IBCS data'[2022])
    MEASURE 'IBCS data'[AC] = SUM('IBCS data'[2023])
    MEASURE 'IBCS data'[FC] = SUM('IBCS data'[2023 Predictions])

    MEASURE 'IBCS data'[DeltaPY] =
        IF(
            ISBLANK([FC]),
            [AC] - [PY],
            [FC] - [PY]
        )

    MEASURE 'IBCS data'[Max value] =
        IF(
            ISBLANK([FC]),
            IF(
                [AC] > [PY],
                [AC],
                [PY]
            ),
            IF(
                [PY] > [FC],
                [PY],
                [FC]
            )
        )

    MEASURE 'IBCS data'[Red Max] = IF(
            [DeltaPY] < 0,
            [Max value]
        )

    MEASURE 'IBCS data'[Green Max] = IF(
            [DeltaPY] > 0,
            [Max value]
        )

    MEASURE 'IBCS data'[Delta Color] = IF(
            [DeltaPY] < 0,
            "#ff0000",
            "#008e96"
        )

    MEASURE 'IBCS data'[DeltaPY %] = DIVIDE(
            [DeltaPY],
            [PY]
        )

Transformations

split columns

use first row as headers

Explore Measures

add Measures to the model


Visualizations

sort month col by month number

format colors for PY, AC, FC.

toggle overlap

Error bars/variance bar:

PY - upper bound: green max

AC - upper bound: red max

FC - upper bound: red max

labels & delta color

Conclusion

Learning Objectives,

  1. Get data & transformations

  2. Cluster column chart visualization

  3. measures

  4. Error bars / variance bars

  5. conditional color format

Source: Power BI Park [Link]

Author: Dheeraj. Yss

Connect with me:

Did you find this article valuable?

Support dheerajy blog by becoming a sponsor. Any amount is appreciated!