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

Replace (BLANK) by a string on a numeric column

Hello.

 

I have the following sample table where the hightligted colum stands for number of days that separates us from the target.

Neandril_3-1666877551810.png

 

Obviously,  this column needs to be numeric, because in my visuals I'm retriveing the MIN value here.

Sometimes, the value here may be (blank). I want to replace this blank value with someting textual, but I can't (and I understand why of course).

 

My formula here looks like this:

 

 

My Formula = 
var _diff = 
IF(
    Table[Col] >= .1,
    DATEDIFF(Table[Date1], Table[Date2], DAY)
)
RETURN
_diff

 

 

 

How can I display a string value when it's blank on a numeric column ?

 

Thank's a lot.

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Neandril , if you need a string, then the other also need to be a string. You can only have one datatype

 

My Formula =
var _diff =
IF(
Table[Col] >= .1,
DATEDIFF(Table[Date1], Table[Date2], DAY)& "", "No Value"

)
RETURN
_diff

Share with Power BI Enthusiasts: 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

@Neandril , if you need a string, then the other also need to be a string. You can only have one datatype

 

My Formula =
var _diff =
IF(
Table[Col] >= .1,
DATEDIFF(Table[Date1], Table[Date2], DAY)& "", "No Value"

)
RETURN
_diff

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.