Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Buen día
Estoy trabajando con la confunción IF para cambiar la información de las graficas dependiendo si se elige un idioma u otro, pero estoy creando MEDIDAS en cada grafica para poder cambiarlas
OFI_Inventario =
VAR ValoresSelecionador = COUNT(IDIOMAS[Idioma])
VAR Seleccion = SELECTEDVALUE(IDIOMAS[Idioma])
VAR METROS = SELECTEDVALUE(Oficinas_Latam[Inventario])
VAR SQF = SELECTEDVALUE(Oficinas_Latam[Inventary sqf])
Var Formato =
IF(
Seleccion = "ESP",
METROS, SQF
)
return Formato
Así crearia la medida para poder cambiar los datos y cada vez que quiero actualizar una nueva tabla tengo que ingresar el mismo codigo en una nueva MEDIDA pero cambiando las columnas
OFI_PRECIO =
VAR ValoresSelecionador = COUNT(IDIOMAS[Idioma])
VAR Seleccion = SELECTEDVALUE(IDIOMAS[Idioma])
VAR PESOS = SELECTEDVALUE(Oficinas_Latam[Precio])
VAR USD = SELECTEDVALUE(Oficinas_Latam[Price USD])
Var Formato =
IF(
Seleccion = "ESP",
PESOS, USD
)
return Formato
Hay alguna manera de juntar los dos codigos? o algunas manera de anidar los IF o que regrese más de un valor al momento de la selección?
Cuando intente anidar los IF y puse la medida en el parametro de la grafica, me decía que no puede regresar más de un valor
Muchas gracias
Solved! Go to Solution.
Hello,
Not sure to understand everything but try something like this
OFI_Measure =
VAR Selection = SELECTEDVALUE(IDIOMAS[Language])
RETURN
SWITCH(
Selection,
"ESP", SELECTEDVALUE(Oficinas_Latam[Inventory]),
"ENG", SELECTEDVALUE(Oficinas_Latam[Inventory sqf]),
"ESP", SELECTEDVALUE(Oficinas_Latam[Price]),
"ENG", SELECTEDVALUE(Oficinas_Latam[Price USD]),
BLANK() -- Default value if it doesn't match any language
)
Tell me if it helps.
Igna
Hello,
Not sure to understand everything but try something like this
OFI_Measure =
VAR Selection = SELECTEDVALUE(IDIOMAS[Language])
RETURN
SWITCH(
Selection,
"ESP", SELECTEDVALUE(Oficinas_Latam[Inventory]),
"ENG", SELECTEDVALUE(Oficinas_Latam[Inventory sqf]),
"ESP", SELECTEDVALUE(Oficinas_Latam[Price]),
"ENG", SELECTEDVALUE(Oficinas_Latam[Price USD]),
BLANK() -- Default value if it doesn't match any language
)
Tell me if it helps.
Igna
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 131 | |
| 103 | |
| 58 | |
| 39 | |
| 31 |