I have a column called "Metrics" , how can I rename the contents in this column?
Metrics |
Adjusted Sales $ |
Adjusted Sales % |
Adjusted Sales $ = Sales $
Adjusted Sales % = Sales %
I think use formula function is ok, but I keep getting error messages...
Also, somehow when I try to filter the columns for "adjusted Sales $" by using formula function, it doesn't work at all.
I believe it is some space between $ and % as I have this message in the data "This cell has trailing spaces"....
So I decided to use Contains([Metrics],"Adjusted Sales") and it works perfectly.
So I can I make the formula to say
if metrics contains "Adjusted Sales $", then Sales$", else "Sales%"
Thank you.
Solved! Go to Solution.
I used the formula of:
IF [Metrics] = 'Adjusted Sales $' THEN 'Sales $' ELSEIF [Metrics] = 'Adjusted Sales %' THEN 'Sales %' ELSE [Metrics] ENDIF
I chose this formula because it is fairly straight-forward and easy to explain. With space concerns, you might include: Trim([Metrics]) to the formula to get rid of all leading/trailing spaces.
Cheers,
Mark
@MarqueeCrew posted the simple answer.
If you are happy with RegEx, I would probably use:
REGEX_Replace([Metrics], "\s*Adjusted (Sales [%|$])\s*", "$1")
which will cope with leading trailing spaces