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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Plot measure on horizontal bar chart as Y-axis

Hi, I'm asking for help plotting a measure onto the Y-axis of my horizontal graph in PBI Desktop. Thanks in advance for all responses!

 

I have a table of dates (for the sake of the example I only care about the month and year), objects with an ID, and a column signifying if each object was "on time". For other reasons this column is either "Y" or null. The table below is an example of what I have.

 

DateObject IDOn Time
02/2022abcY
02/2022defnull
03/2022ghiY
03/2022jklY
05/2022mnonull

 

I also have a measure in my dashboard which counts the percentage of "on time" objects vs total objects. The goal of this measure is so that I can see the total percentage of "on time" objects each month. This is my measure:

 

 

PercentCompletedOnTime = FORMAT(ROUND(DIVIDE(Count('Table'[On Time]), Count('Table'[Object ID])), 2), "Percent")

 

 
Now my problem: I want to plot the measure onto a horizontal bar chart by month, but PBI won't let me add the measure to anything other than the tooltips.
 
PBI does allow me to plot the month on the x-axis and the count of object IDs on the y-axis. So I can see total objects each month, good but not what I want. Strangely I'm allowed to add the measure "PercentCompletedOnTime" into the tooltips though. As can be seen in the screenshot below.
 
So if I hover my mouse over the bar, I can see the measure's value for each month. PBI shows me that it can count the value each month, but it won't actually let me make a bar from it. What am I doing wrong?
 
Screenshot 2022-06-22 184241.png
Screenshot 2022-06-22 185618.png
 
What do I need to do to for PBI to allow me to put the "PercentCompletedOnTime" measure into the Y-axis and not the tooltip?
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create it like

PercentCompletedOnTime = ROUND(DIVIDE(Count('Table'[On Time]), Count('Table'[Object ID])), 2)

 

and mark it as % measure using measure tool

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create it like

PercentCompletedOnTime = ROUND(DIVIDE(Count('Table'[On Time]), Count('Table'[Object ID])), 2)

 

and mark it as % measure using measure tool

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.