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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Create Calculated column based on column value which are starting with "UC" character

Hello Team,
@danextian @v-henryk-mstf @Anonymous @V1 

I have a table where i need to have a new column based on "Alloc Entity Code" Column. In the New calculated column the values starting with "UC" character should only be displayed. Can anyone please help me with the DAX.

gunshruthi_0-1654681253723.png

https://community.powerbi.com/t5/user/viewprofilepage/user-id/313

https://community.powerbi.com/t5/user/viewprofilepage/user-id/390395
https://community.powerbi.com/t5/user/viewprofilepage/user-id/396724

https://community.powerbi.com/t5/user/viewprofilepage/user-id/148838

https://community.powerbi.com/t5/user/viewprofilepage/user-id/245936

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

You could create a column as below:-

Column =
VAR _start_with =
    LEFT ( 'Table (3)'[alloc_entity_code], 2 )
RETURN
    IF ( _start_with = "UC", 'Table (3)'[alloc_entity_code] )

Output:-

Samarth_18_0-1654682768304.png

BR,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

1 REPLY 1
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

You could create a column as below:-

Column =
VAR _start_with =
    LEFT ( 'Table (3)'[alloc_entity_code], 2 )
RETURN
    IF ( _start_with = "UC", 'Table (3)'[alloc_entity_code] )

Output:-

Samarth_18_0-1654682768304.png

BR,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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
Top Kudoed Authors