Hi guys, sorry for bothering you. I'm making ...

Hi guys, sorry for bothering you. I’m making an app for a census with almost 500 neighborhoods. Each one is supposed to have an unique code for identifying purposes. In order to save time for the people who is going to make the work on the street i’m trying to apply that code number using the substitute function on the “Id Barrio” row, but it only works with the first choice.

Leaving an example:

SUBSTITUTE([Barrio], “Nueva Córdoba”, “291”) SUBSTITUTE([Barrio], “Alta Córdoba”, “17”) SUBSTITUTE([Barrio], “Alberdi”, “12”) SUBSTITUTE([Barrio], “Alto Alberdi”, “19”)

For the first one it works fine, then it returns “Alta Cordoba”, “Alberdi” and so on.

How may I fix this? Thanks in advance!

0 2 336
2 REPLIES 2

May I ask why do you need to use substitute? Why don’t you read the value from a table directly?

@Tomadato_Auditores, was that entire thing meant to be a single expression. If so, use something like this:

SWITCH ([Barrio],

“Nueva Cordoba”, 291,

“Alta Cordoba”, 17,

“Alberdi”, 12)

Top Labels in this Space