Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Expressions that yield variant data-type

Hello,

 

I've been trying to figure out a work around for the formula below so that I can get a date back, but I haven't had much luck.

 

= IF(Append1[ Planned order qty]=BLANK(),Append1[Column 4],Append1[Column 2])
 
I understand you can't compare text to numbers to get a result, but I'm wondering if anyone can assist in making this work.
 
For context, the formula is looking at a column and checking if there is a blank where there should be a number, and if not it need to go grab a date from coulmn 4. If it does have a number it grabs a date from coulmn 2.

Any help would be great!
 
Thank you!
  • Anonymous , You need to make sure data type is same

     

    IF(isblank(Append1[ Planned order qty]),Append1[Column 4],Append1[Column 2])
    or
    IF(isblank(Append1[ Planned order qty]),Append1[Column 4] & "" ,Append1[Column 2] & "")

3 Replies

  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    it looks like you ahve a different data types for column4 and column2

    Make sure it has the same date type and it should help you

  • Anonymous , You need to make sure data type is same

     

    IF(isblank(Append1[ Planned order qty]),Append1[Column 4],Append1[Column 2])
    or
    IF(isblank(Append1[ Planned order qty]),Append1[Column 4] & "" ,Append1[Column 2] & "")

  • v-alq-msft's avatar
    v-alq-msft
    Community Support

    Hi, Anonymous 

     

    Based on your description, I created sample data to reproduce your scenario.

     

    You may create a calculated column as below to convert the data type of the column to text.

    Result = 
    IF(
        Append1[Planned order qty]=BLANK(),
        CONCATENATE(Append1[Column 4],""),
        CONCATENATE(Append1[Column 2],"")
    )

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.