Forum Discussion
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.
- Anonymous3 years ago
Hi Anonymous ,
Please try below steps:
1. below is my test table
Table:
2. create a column with below dax formula
Column = VAR _a = INT ( [Column1] ) VAR _result = IF ( ISERROR ( _a ), [Column1], BLANK () ) RETURN _resultPlease 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.
2 Replies
- ray_aramburo
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.
- AnonymousNot applicable
Hi Anonymous ,
Please try below steps:
1. below is my test table
Table:
2. create a column with below dax formula
Column = VAR _a = INT ( [Column1] ) VAR _result = IF ( ISERROR ( _a ), [Column1], BLANK () ) RETURN _resultPlease 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.