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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
shoeb1359
Helper II
Helper II

Custom Message for Missing Values in Clustered Bar Chart

Hello Experts,

I want to display custom message for missing value in Clustered Bar Chart. For Calculating values I am using measure.

shoeb1359_0-1734402031873.png

 

CategorySubCategoryProfit
Category AA1100
Category AA2200
Category AA3300
Category BB1 
Category BB2 
Category CC1600

Thanks

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

Hi @shoeb1359 

 

Assuming that's how really your table is, you can replace blanks with zero and then use custom label.

Custom Label =
IF (
    ISBLANK ( [Sum of Profit] )
        || [Sum of Profit] = 0,
    "no available data",
    FORMAT ( [Sum of Profit], "$#,#" )
)

danextian_0-1734413612082.png

you can use conditional formatting on label font color to make it red for those without data

danextian_1-1734413675730.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

Hi @shoeb1359 ,

We are grateful for your participation in the Microsoft Fabric Community forum.
As per requirement addressing your query.

  • As you mentioned, "it’s Avg % Utilization, which is basically based on 2 columns":
  • I have taken the sample data below and created a custom column (Average Completed Work and Capacity), i.e., the average of two columns.

vpriyankata_0-1734517569790.png

 

  • Create a measure

**********************************************************

Utilization = DIVIDE(

    SUM('Sheet1'[Completed Work]),

    SUM('Sheet1'[Capacity (Hours)]),

    BLANK()

)

**********************************************************

  • Create another measure for custom message

**********************************************************

Custom Message =

IF(

    ISBLANK([Utilization]) || [Utilization] = 0,

    "No available data",

    FORMAT([Utilization], "0.0%")

)

**********************************************************

  • Now, select the Clustered Bar Chart. Drag "Task ID" to the Y-axis and drag the Custom column (Average Completed Work and Capacity) to the X-axis.
  • Then, go to the Format pane > Data labels and enable the Data Labels. In the Data labels, enable the value option and add the field "Custom Message" as below. You can also change the font size and color.

 

vpriyankata_1-1734517569800.png

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.


Thanks,
Priyanka.

CST community member.

View solution in original post

10 REPLIES 10
danextian
Super User
Super User

Hi @shoeb1359 

 

Assuming that's how really your table is, you can replace blanks with zero and then use custom label.

Custom Label =
IF (
    ISBLANK ( [Sum of Profit] )
        || [Sum of Profit] = 0,
    "no available data",
    FORMAT ( [Sum of Profit], "$#,#" )
)

danextian_0-1734413612082.png

you can use conditional formatting on label font color to make it red for those without data

danextian_1-1734413675730.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

ProjectDeveloperCapacityCompleted Work
Project ADeveloper 11210
Project ADeveloper 212.515
Project BDeveloper 1132.5
Project BDeveloper 3  
Project CDeveloper 4  
Project DDeveloper 21011

Hi ,

I have attached my screenshot from sample file. Not sure what i am missing

shoeb1359_0-1734595754255.png

 

shoeb1359_1-1734596007299.png

 



Thanks 

Hi @shoeb1359 ,

Please replace "null/blank" with "0" and try again.

It's not working in my Case 

In sample data we are referring whole number and single column but in real data it's Avg % Utilization which is basically based on 2 columns. 

Average Utilization = AVERAGEX('Test 1',DIVIDE(SUM('Table'[Completed Work]),SUM('Table'[Capacity (Hours)])))

Custom Label : 

if(ISBLANK(Average Utilization) || Average Utilization= 0, "no available data", FORMAT(Average Utilization), "0.0%"))




Hi @shoeb1359 ,

We are grateful for your participation in the Microsoft Fabric Community forum.
As per requirement addressing your query.

  • As you mentioned, "it’s Avg % Utilization, which is basically based on 2 columns":
  • I have taken the sample data below and created a custom column (Average Completed Work and Capacity), i.e., the average of two columns.

vpriyankata_0-1734517569790.png

 

  • Create a measure

**********************************************************

Utilization = DIVIDE(

    SUM('Sheet1'[Completed Work]),

    SUM('Sheet1'[Capacity (Hours)]),

    BLANK()

)

**********************************************************

  • Create another measure for custom message

**********************************************************

Custom Message =

IF(

    ISBLANK([Utilization]) || [Utilization] = 0,

    "No available data",

    FORMAT([Utilization], "0.0%")

)

**********************************************************

  • Now, select the Clustered Bar Chart. Drag "Task ID" to the Y-axis and drag the Custom column (Average Completed Work and Capacity) to the X-axis.
  • Then, go to the Format pane > Data labels and enable the Data Labels. In the Data labels, enable the value option and add the field "Custom Message" as below. You can also change the font size and color.

 

vpriyankata_1-1734517569800.png

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.


Thanks,
Priyanka.

CST community member.

Follow the same , Still not working .

Can you share your pbix file. Wanted to cross check formatting part .you forgot to mention here

Attached!

As the proposed solutions are based on the sample data, the sample should always represent the actual data and is not overly simplified.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
shoeb1359
Helper II
Helper II

As I have dynamic data it seems it's not worked. I tried but no luck.

Please share file if you did at your end

VahidDM
Super User
Super User

Hi @shoeb1359 

 

You can't directly show a custom message inside a clustered bar chart for missing values. Bar charts only display numeric values, not text messages.

Workarounds:

  1. Card Visual for Messages:

    • Create a measure that checks if data is missing (e.g., returns TRUE if no data).
    • If data is missing, display a separate card visual with your custom message.
    • If data exists, the card remains blank or hidden.
  2. Placeholder Values:

    • Instead of returning BLANK() from your measure, return a small placeholder value (e.g., 0.0001).
    • Use conditional formatting to color bars differently for "no data" scenarios.
    • Add a legend or tooltip explaining that a very small bar indicates missing data.

These methods help convey messages for missing values indirectly, since bar charts cannot directly display text-based messages in place of numeric values.

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

 

LinkedIn|Twitter|Blog |YouTube 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors