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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
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.