String Rename

Hello there,

Could you please help me to rename exact string in the field?

For example I have specific field “Decline Reasons” and there are a lot of strings. I want to rename “59:Suspected Fraud” to “AF”

image

But I already have calculated filed to convert strings to % and I want to add renaming as well

percentOfTotal(count({order_id}),[])

Thank you!

Hi @weird_guy
you would need to do it on data side (database/file) or create a new calculated field.

ifelse({Decline Reasons} = "59:Suspected Fraud","AF",{Decline Reasons})

BR

1 Like

@ErikG Dear Erik,

Could you please clarify how to combine these two formulas into one?

Why do you want do combine?
What do you want to achieve?

1 Like

@ErikG
Your calculated field works perfect on “Line Chart” (just applied it on Color group)

But doesn’t work on “Horizontal bar chart”

What do you mean by “doesnt work” and how is it related to the percent calculation?

1 Like

Regarding “calculating percentages”, I use a calculated field to sort orders by percentages rather than by quantity.
I use a calculated field for this purpose:
percentOfTotal(count({order_id}),[])

image
image

But I want to mask One string (kind of declines) to specific one.

can you share a sample? maybe as table (current vs target)

Hi @weird_guy

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

Hi @weird_guy,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!