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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Custom column with date

Hello, 

 

I have a table with a field that populated with the date '31-12-9999' when it's actualty empyt. There's also an integer field with the value -99999999 (or de the date for exampl 20180917, if it's available).

 

I'm trying to create an custom column with no date if the value of the integer field is -99999999 and the date if there is an onther value in the field. I've tryed in several ways, but till now without result. I hope someone can help me.

 

Kolom = IF(DimDatumEinde[DatumGetal] = -99999999 ; "0"; DATEVALUE(DimDatumEinde[Datum einde]))

The error I get is: Expressions that yield variant data-type cannot be used to define calculated columns.

 

Regards, 
Ingrid

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I've found the BLANK() function and that works.

Sorry, I'm a newbie so still searching and learning.

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

Try 0 instead of "0".

That will prevent the error.  The error is caused because the calculated column can't have values that are text or datetime (in the same column)

Anonymous
Not applicable

Thanks for your reply.

That does indeed prevent the error, but what I actually want is that the column is empty (in stead of 0). 

How can I get that working?

Anonymous
Not applicable

I've found the BLANK() function and that works.

Sorry, I'm a newbie so still searching and learning.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors