Forum Discussion
Replacing text in column with new text based on condition
- 6 years ago
if it is a value in a cell, use substitute
Column = SUBSTITUTE('Table'[Column1],"-",UNICHAR(8211))if it is the name of a measure, you replace the whole measure name
you can use DAX to create a column
Column = SUBSTITUTE("-",'Table'[Column1],UNICHAR(8211))
- johnwedeles6 years ago
Helper III
Thank you, Greg_Deckler and ryan_mayu . I tried both the REPLACE and SUBSTITUTE functions, and unfortunately when I try to select the appropriate table and column, the specific column does not show up as an option. Note, it is a string variable. I get an error message saying that "a single value for this column cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
- Greg_Deckler6 years ago
Community Champion
johnwedeles - If you are creating a measure, then you will need to wrap the column reference in an aggregator like MAX, MIN, etc.
- johnwedeles6 years ago
Helper III
Thank you, Greg_Deckler . I am entering this code but it is not working - is the right placement for the MAX function?
Measure = SUBSTITUTE(MAX('Performance rates'[New Rate Definition])"-",UNICHAR(8211)))