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
am_i_really
Frequent Visitor

Looking for measure or custom column similar to if else statement

Hi All, 

 

I'm looking for a measure or custom column that is similar to an if else statement. My column [Type] has a bunch of values that start with AE, what I need is that for any entry that starts with AE the result should be "AE", everything else should be "other". 

 

Table name: Table

Column name: Type

Text starts with AE: AE

All other entries: Other

 

Thanks in advance!

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

You can write a custom column in the query editor like this:

if Text.Start([Type], 2) = "AE" then "AE" else "Other"

The DAX calculated column equivalent would be

IF ( LEFT ( [Type], 2 ) = "AE", "AE", "Other" )

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

You can write a custom column in the query editor like this:

if Text.Start([Type], 2) = "AE" then "AE" else "Other"

The DAX calculated column equivalent would be

IF ( LEFT ( [Type], 2 ) = "AE", "AE", "Other" )

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors