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
Anonymous
Not applicable

Replacing (Blank) in a chart legend with custom text

Hello,

 

My chart looks as follows. I would like to replace the (blank) field in the legend with custom text. 

Dlive01_0-1595090649364.png

 

Source data where Table One is in the legend field and table two is in the Axis field of the chart.

Dlive01_1-1595090733382.png

 

 

 

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

You can create a Calculated Column

 

Column = If('Table'[Date] = BLANK(), "Custom Text",FORMAT('Table'[Date],"DD-MM-YYYY"))

 

1.jpg

 

Regards,
Harsh Nathani

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

View solution in original post

6 REPLIES 6
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

 

You can create a Calculated Column

 

Column = If('Table'[Date] = BLANK(), "Custom Text",FORMAT('Table'[Date],"DD-MM-YYYY"))

 

1.jpg

 

Regards,
Harsh Nathani

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

mahoneypat
Microsoft Employee
Microsoft Employee

I assume that you have a relationship between the tables on the date column and the blank is coming due to the "blank row" auto created since you have rows in Table Two not in Table One.  The easiest fix is to make a new DAX table for your legend that is the distinct combination of both tables, like this

NewDatesTable = DISTINCT(UNION(DISTINCT(Table One[Dates]), DISTINCT(Table Two[Dates])))

 

You can connect this new table to both tables and use it in your legend, axis, or where needed.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 

 

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

I didn't manually create any relationships

 

 

Actual data looks as follows:

 

 

Capture.JPG

 

 

 

 

Anonymous
Not applicable

Capture.JPG

Delete both of the ", [Dates]".  You already have your Table[Column] s listed.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Table One is confirmed appointments and table Two are estiamted arrivals. 

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.