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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Bar Chart - Change "Blank" Title of a single bar to "No Date"

Hi there, 

 

instead of changing my source data i'd like to use Power BI to automatically change any "Blanks" to show text. The Source data is currently formatted to Date within Excel and therefore any text written in there doesnt come through to Power BI. 

 

I have a Bar Chart below showing what is happening.  Is there a way to make Power BI show "No date" instead of Blank?

 

Stuffit25_1-1632818674271.png

 

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

As @yakm said,  to add a calculated column or add a column to the power query and use the new column as the X-axis.

1). in power bi

 

_date = IF(ISBLANK([Date]),"No date",FORMAT([Date],"long date"))

 

2).  in power query

vangzhengmsft_0-1632981260838.png

And sort by Date, the result like this:

vangzhengmsft_1-1632981311974.png

Please refer to the attachment below for details. Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

As @yakm said,  to add a calculated column or add a column to the power query and use the new column as the X-axis.

1). in power bi

 

_date = IF(ISBLANK([Date]),"No date",FORMAT([Date],"long date"))

 

2).  in power query

vangzhengmsft_0-1632981260838.png

And sort by Date, the result like this:

vangzhengmsft_1-1632981311974.png

Please refer to the attachment below for details. Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Fantastic - this is exactly what i needed thank you 🙂

Anonymous
Not applicable

you need to firstly check what is in the legend of the visual, then go to the table view and add new calculated column with if formula (this is for the case you have legend from your fact table)

if you have this legend from separate table the easiest way would be probably to change it to the fact table as i described 

 

Anonymous
Not applicable

Hey, thanks for the reply... very new to the program and have inherited the power bi document. are you able to elaborate at all for me please? (sorry!)

Anonymous
Not applicable

i think you can try creatin calculated column that replaces blank with "no date" or you can do it in power query

Anonymous
Not applicable

maybe i should include this?

 

i've tried to do an iferror show "No Date Given" but doesnt work... 

Stuffit25_1-1632840809227.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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