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
eng_123
Frequent Visitor

Add text value in bar chart instead of integer value

Need assitance for a bar chart in x axis instead of using a measure (used as count distinct) for status could we use text value to be displayed of Pass or Fail. 

 

From

 

eng_123_0-1755067168232.png

 

To

eng_123_1-1755068279223.png

 

If this cannot be done in bar chart please let me know if any other visual could be used to achieve this.

 

unable to Attach  PBIX file but below is tables to enter in power bi desktop.

 

ApplicationStatus
App 1Pass
App 10Pass
App 2Pass
App 3Fail
App 4Fail
App 5Fail
App 6Fail
App 7Pass
App 8Pass
App 9Pass

 

 

 

 

1 ACCEPTED SOLUTION
jaineshp
Memorable Member
Memorable Member

Hey @eng_123,

Looking at your images, I can see you want to display "Pass" and "Fail" text labels on your bars instead of the count values. This is definitely achievable in Power BI! Here are several approaches:

Method 1: Data Labels with Custom Text (Recommended)

  1. Select your bar chart and go to the Format pane
  2. Turn on Data labels
  3. In Data labels settings, change the Value dropdown from "Auto" to a field that contains your Pass/Fail text
  4. If you don't have a separate text field, create a calculated column or measure:

Status Text =
IF([Status] = 1, "Pass", "Fail")

 

Method 2: Create a Status Text Column

If your current Status field is numeric (1/0), create a new calculated column:

 

Status Label =
SWITCH([Status],
1, "Pass",
0, "Fail",
"Unknown"
)

Then use this new column in your data labels.

Method 3: Alternative Visuals

If the bar chart doesn't work perfectly, consider these alternatives:

  • Stacked Bar Chart: Shows Pass/Fail segments clearly
  • Table Visual: Simple and clear display of status by app
  • Matrix Visual: Good for showing status across multiple dimensions
  • Custom Visual: Consider "Bullet Chart" or "Linear Gauge" from AppSource

Method 4: Conditional Formatting

You can also:

  1. Keep the numeric values but use conditional formatting
  2. Set background colors (green for Pass, red for Fail)
  3. Use data bars with custom colors

Quick Fix for Your Current Chart

  1. Go to FormatData labelsOn
  2. Under Value, select your status field
  3. Under Display units, choose "None"
  4. Create a simple measure:

Status Display = IF(MAX([Status]) = 1, "Pass", "Fail")

 

Fixed? Mark it • Share it • Help others!

 

Best Regards,

Jainesh Poojara | Power BI Developer

View solution in original post

2 REPLIES 2
eng_123
Frequent Visitor

 Thank you changed it and seems to work fine now

 

eng_123_0-1755069757221.png

 

jaineshp
Memorable Member
Memorable Member

Hey @eng_123,

Looking at your images, I can see you want to display "Pass" and "Fail" text labels on your bars instead of the count values. This is definitely achievable in Power BI! Here are several approaches:

Method 1: Data Labels with Custom Text (Recommended)

  1. Select your bar chart and go to the Format pane
  2. Turn on Data labels
  3. In Data labels settings, change the Value dropdown from "Auto" to a field that contains your Pass/Fail text
  4. If you don't have a separate text field, create a calculated column or measure:

Status Text =
IF([Status] = 1, "Pass", "Fail")

 

Method 2: Create a Status Text Column

If your current Status field is numeric (1/0), create a new calculated column:

 

Status Label =
SWITCH([Status],
1, "Pass",
0, "Fail",
"Unknown"
)

Then use this new column in your data labels.

Method 3: Alternative Visuals

If the bar chart doesn't work perfectly, consider these alternatives:

  • Stacked Bar Chart: Shows Pass/Fail segments clearly
  • Table Visual: Simple and clear display of status by app
  • Matrix Visual: Good for showing status across multiple dimensions
  • Custom Visual: Consider "Bullet Chart" or "Linear Gauge" from AppSource

Method 4: Conditional Formatting

You can also:

  1. Keep the numeric values but use conditional formatting
  2. Set background colors (green for Pass, red for Fail)
  3. Use data bars with custom colors

Quick Fix for Your Current Chart

  1. Go to FormatData labelsOn
  2. Under Value, select your status field
  3. Under Display units, choose "None"
  4. Create a simple measure:

Status Display = IF(MAX([Status]) = 1, "Pass", "Fail")

 

Fixed? Mark it • Share it • Help others!

 

Best Regards,

Jainesh Poojara | Power BI Developer

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.