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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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] & "")

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

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

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

b1.png

 

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:

b2.png

 

Best Regards

Allan

 

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

amitchandak
Super User
Super User

@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] & "")

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
az38
Community Champion
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


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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