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
Yaniv
Helper I
Helper I

Insert blank value based on another field

Hi,

 

I have a table named 'service'.

I want to create a new calucuated column that says if the field 'done' (date field) is blank do not insert any value but if the 'done' field is not blank insert the date value+one day.

Below what I already tried - 

 

1. NewColumn= IF(Service[Done]=BLANK(),BLANK(),Service[Done]+1) 

I get the error message - Column '' in Table '' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.

 

2. NewColumn = IF(Service[Done]=BLANK()," ",Service[Done]+1)

Error message: Expressions that yield variant data-type cannot be used to define calculated columns.

 

Does anyone have an idea how to resolve it? I'm getting frustrated Smiley Happy

 

1 ACCEPTED SOLUTION

Hi @Yaniv,

 

I changed the data type of Service[Done] from Text to Date/Time, delete and recreate the calculated column Service[DoneDate], everything worked.

 

I have sent you the modified pbix file through private message.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

17 REPLIES 17

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.