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
John21Morales
New Member

DAX command "if" statement not finding column

John21Morales_0-1672603121040.png

New to Power BI, I couldn't find out how to put the column "Churn Label" into the IF Command, so I went to the solutions (Of the exercise I was doing for DataCamp) to find out. It turns out, I knew how to do it but the way I was typing it in was not working.

 

Anyways, I tried to type it in as "Churneb" in the solutions file, and the same exact DAX command did not work. Is there something I am missing? 

 

Thanks in advance!

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @John21Morales 

You are creating a measure. You can use the same formula to create a calculated column. Otherwise, you need to wrap the column with SELECTEDVALUE:

IF ( SELECTEDVALUE ( 'Table'[Column] ) = "ABC", 1, 0 )

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @John21Morales 

You are creating a measure. You can use the same formula to create a calculated column. Otherwise, you need to wrap the column with SELECTEDVALUE:

IF ( SELECTEDVALUE ( 'Table'[Column] ) = "ABC", 1, 0 )

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.