Forum Discussion

Pallavi_m's avatar
Pallavi_m
Helper I
3 years ago
Solved

Line and stacked column chart

Hi, I have a chart like this.   Now, I have an year column on x-axis.  Year 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 I have already claculated measures like total sales etc., ...
  • Arul's avatar
    3 years ago

    Pallavi_m ,

    I hope below are your expectation.
    Expected existing:

    Expected Outcome:

    To achieve this, you have to create a calculated column with the below code and use it in your visual.

     

    Group =
    IF ( Sales[Year] >= 2015 && Sales[Year] <= 2021, "A", "B" )

     

    To change the colors. go to the visual format pane. Under the format pane choose columns and enable show all and change the color to grey for A and Blue for B.

    Thanks,