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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
adoster
Resolver I
Resolver I

IF AND dax statement assistance

Hi,

Having some difficulty creating a new column using an IF/AND statement

 

New column should only show values that are Phase 3 AND have been billed

 

Simple data example

PRC_NAMEBILLING PROVIDER NAMEDesired Results Column
Phase 1Smith, Michael0
Phase 2Johnson, Christopher0
Phase 3Williams, JessicaBilled P3
Phase 3Brown, MatthewBilled P3
Phase 3 0
Phase 3 0
Phase 3Miller, JoshuaBilled P3
Phase 3Davis, AmandaBilled P3
Phase 2Rodriguez, Daniel0
Phase 1Martinez, David0
Phase 1Allen, Melissa0

 

 

Here is what i've tried

Phase3Billed = IF ('All HOD Visits'[PRC_NAME] = "Phase 3" && 'All HOD Visits'[BILLING PROVIDER NAME] <> BLANK(), "Billed P3", 0)

 

This returns an error "Expressions that yield variant data-type cannot be used to define calculated columns

 

Thanks for any assistance!

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Sorry You just add "0" to your zero at the end. That way it is all string data.

 

Test = IF(AND('All HOD Visits'[PRC_NAME] = "Phase 3", 'All HOD Visits'[BILLING PROVIDER NAME] <> BLANK())), "Billed P3", "-")

View solution in original post

4 REPLIES 4
Whitewater100
Solution Sage
Solution Sage

Sorry You just add "0" to your zero at the end. That way it is all string data.

 

Test = IF(AND('All HOD Visits'[PRC_NAME] = "Phase 3", 'All HOD Visits'[BILLING PROVIDER NAME] <> BLANK())), "Billed P3", "-")
Whitewater100
Solution Sage
Solution Sage

Hello:

 

You can try

 

IF(AND('All HOD Visits'[PRC_NAME]= "Phase 3", NOT(ISBLANK('All HOD Visits'[BILLING PROVIDER NAME]), "Billed P3", 0))

 

I hope this works for your application.

That returns "Operator or expression '()' is not supported in this context

IF(AND(('All HOD Visits'[PRC_NAME]= "Phase 3", 'All HOD Visits'[BILLING PROVIDER NAME]) <> BLANK())), "Billed P3", "blank")
 
This should work. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.