Forum Discussion

lmpb1988's avatar
lmpb1988
Frequent Visitor
1 year ago
Solved

Variaton in a grouped line and column chart

Hello

I have a grouped line and column chart in Power BI where I have the name of the month on the x axis and the years 2024 and 2023 on the y axis, and the totals for each month appear at the top of the columns and so far so good.

 

I also have measurements already taken for the variation between the two years, both in number and percentage, which I wanted to place in the middle of the columns, as per this image attached.

 

Thanks

 

 

  • Hi lmpb1988 

     

    Instead of adding the years to th axis and selecting the year, you will need to create three measures and add them to the chart. One each for 2023, 2024 and for the difference.

  • Hi lmpb1988 ,
    The chart you shared effectively shows a grouped column comparison between two years, with both absolute and percentage variations displayed between the bars, which enhances the visual analysis. However, Power BI’s default visual capabilities don’t support placing custom values, like your variation metrics, directly between grouped columns. 

     

    To replicate this, you can either use a layered approach by combining the grouped column chart with additional visuals such as cards or a matrix to display the variation values in the desired positions, or opt for a custom visual like Charticulator or Deneb, which offers greater layout control and allows you to design visuals where labels and data points can be precisely positioned. While this requires extra setup effort, either method will enable you to recreate the informative and well-structured visualization you've shown.

     

6 Replies

  • Hi lmpb1988 

     

    Instead of adding the years to th axis and selecting the year, you will need to create three measures and add them to the chart. One each for 2023, 2024 and for the difference.

  • Hi lmpb1988 ,
    The chart you shared effectively shows a grouped column comparison between two years, with both absolute and percentage variations displayed between the bars, which enhances the visual analysis. However, Power BI’s default visual capabilities don’t support placing custom values, like your variation metrics, directly between grouped columns. 

     

    To replicate this, you can either use a layered approach by combining the grouped column chart with additional visuals such as cards or a matrix to display the variation values in the desired positions, or opt for a custom visual like Charticulator or Deneb, which offers greater layout control and allows you to design visuals where labels and data points can be precisely positioned. While this requires extra setup effort, either method will enable you to recreate the informative and well-structured visualization you've shown.

     

  • v-dineshya's avatar
    v-dineshya
    Icon for Community Support rankCommunity Support

    Hi lmpb1988 ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    Power BI's native column chart doesn't allow placing custom text between columns out of the box. But here are two workarounds:

    Option 1: Use a Combo Chart (Column + Line): You can overlay data labels using a line chart for variations.

    Steps: Add your grouped column chart with totals for 2023 and 2024. Convert the chart to a Combo Chart (Line and Clustered Column). Drag the Variation % and Absolute Diff into the Line Values. Format the line series: Change line shape to none (to hide the line). Show data labels. Customize label positions, colors (green/red), and number format. Add a custom tooltip if desired. This will make the variation appear between columns, just like in your image.

    Option 2: Use Deneb (Custom Visual) for Full Control: If you want pixel-perfect control like the image: Install Deneb custom visual. Use Vega-Lite syntax to build a grouped bar chart. Overlay your variation text exactly where needed (centered between bars). This takes more effort but gives full design flexibility.


    Note: You can use conditional formatting on the labels to color them green/red based on increase or decrease. Use transparent line markers to avoid distracting visuals.

     

    If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

    Thank you

    • v-dineshya's avatar
      v-dineshya
      Icon for Community Support rankCommunity Support

      Hi lmpb1988 ,

       

      If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

      Thank you

      • v-dineshya's avatar
        v-dineshya
        Icon for Community Support rankCommunity Support

        Hi @lmpb1988 ,

         

        If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

        Thank you