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
jaltoft
Resolver I
Resolver I

Formulae help

Hello,

 

Can anyone help with my formulae?

 

= IF('Visit timescale'[Custom category]="Statutory Cases :"||'Visit timescale'[Custom category]="PF"||'Visit timescale'[Custom category]="Contact",AND('Visit timescale'[Eligible for Visit ]=BLANK(),AND('Visit timescale'[Custom category]="CIN",'Visit timescale'[Date of last Visit]="Not Eligible")),"Not Required")

 

The column Custom category is a text category which pulls through the category of the case.

Eligible for visit is a column that is text which has a Y in if eligible, date of last visit will either be the date or say not required.

 

I am getting a message Expressions that yield variant data - type cannot be used to define calculated columns.

My issue is ive split the formulae up and in works in bits, the issue seems to come when combing the or and the And.

 

If trying to replicate this formulae -

 

IF(OR([@[New Category]]="Statutory Cases:",[@[New Category]]="PF",[@[New Category]]="Contact",AND([@[Eligible for Visit]]="",[@[New Category]]="CIN",[@[Date of Last CIN Visit ]]="Not Eligible")),"Not Required"

 

1 ACCEPTED SOLUTION

Hello @timg thanks for the reply I have figured it out -

= IF(OR('Visit timescale'[Custom category]="Statutory Cases:"||'Visit timescale'[Custom category]="PF"||'Visit timescale'[Custom category]="Contact",AND('Visit timescale'[Eligible for Visit]=BLANK(),'Visit timescale'[Custom category]="CIN")&&'Visit timescale'[Date of last Visit]="Not Eligible"),"Not Required")

View solution in original post

2 REPLIES 2
timg
Solution Sage
Solution Sage

Hi Jaltoft,

Currently the circled part of the formula is seen as the resultiftrue reaction. So if the first 3 lines are true it will try to execute those next 5 lines. If not true, then it will return "not required". Since the resultistrue part starts with an "AND" this is probably the cause of your trouble. Am I correct to assume that those "AND" statements should also be in the logicaltest argument of the formula instead of the resultiftrue argument?

1.PNG

Regards,

Tim





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello @timg thanks for the reply I have figured it out -

= IF(OR('Visit timescale'[Custom category]="Statutory Cases:"||'Visit timescale'[Custom category]="PF"||'Visit timescale'[Custom category]="Contact",AND('Visit timescale'[Eligible for Visit]=BLANK(),'Visit timescale'[Custom category]="CIN")&&'Visit timescale'[Date of last Visit]="Not Eligible"),"Not Required")

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