Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jk100
Frequent Visitor

Display Column Names with Values on Bar Chart

Hi,

I have columns called 'Duration 1' and 'Duration 2' and they contain numeric values. I would like to display the name of the column on the Y-axis directly next to its corresponding bar so the user does not have to use a legend to identify the columns.

powerbiBarChart.png

 
What is the best way to approach this?

Thank you for you help

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@jk100 ,

try static table approach,

1. Create a table like this by using enter data option,

Arul_0-1677751638480.png

2. Then write two measures for Duration 1 and Duration 2,

Duration 1 = SUM(YourTablename[ Duration 1])
Duration 2 = SUM(YourTablename[ Duration 2])

3. Then write this switch measure to bring the values to the graph,

Metrics Measure = 
 SWITCH(
     SELECTEDVALUE('Static Table'[Metrics]),
     "Duration 1",[Duration 1],
     "Duration 2",[Duration 2]
    )

4. Drag the metrics column from static table and the switch measure to the visual,

Arul_1-1677751862269.png

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

@jk100 ,

try static table approach,

1. Create a table like this by using enter data option,

Arul_0-1677751638480.png

2. Then write two measures for Duration 1 and Duration 2,

Duration 1 = SUM(YourTablename[ Duration 1])
Duration 2 = SUM(YourTablename[ Duration 2])

3. Then write this switch measure to bring the values to the graph,

Metrics Measure = 
 SWITCH(
     SELECTEDVALUE('Static Table'[Metrics]),
     "Duration 1",[Duration 1],
     "Duration 2",[Duration 2]
    )

4. Drag the metrics column from static table and the switch measure to the visual,

Arul_1-1677751862269.png

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.