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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Contains Text Measure to create new column

Hi, how do I create a measure where column contains a few text strings then adds the value of the text to a new column ,(like add column, conditional formatting in query editor), but I need a measure to it calculates automatically on refresh of data. Thanks Andy.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1692690172198.png

2. create a column with below dax formula

Column =
VAR _a =
    INT ( [Column1] )
VAR _result =
    IF ( ISERROR ( _a ), [Column1], BLANK () )
RETURN
    _result

vbinbinyumsft_1-1692690200459.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1692690172198.png

2. create a column with below dax formula

Column =
VAR _a =
    INT ( [Column1] )
VAR _result =
    IF ( ISERROR ( _a ), [Column1], BLANK () )
RETURN
    _result

vbinbinyumsft_1-1692690200459.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ray_aramburo
Super User
Super User

I'd do this with Power Query instead of with DAX using a conditional column to evaluate if Text.Contains and if that's the case the value will be that string. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





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.

Top Solution Authors