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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.