Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Syndicate_Admin
Administrator
Administrator

Variable en columnas

Tengo 1000 países,

CountryName = "ES",
Position = List.PositionOf(List.Transform(Translate[CountryName], (x) => Text.Contains("tipo", x)), true)

¿Cómo poner CountryName como variable en la referencia de tabla? por lo que Translate[CountryName] debería obtener información del nombre de la columna ES Translate[ES]

ahora recibo un error

Expression.Error: No se encontró la columna 'CountryName' de la tabla.
Detalles:
Nombre del país

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@Digger ,

Para establecer algo como una variable en Power Quer use let para que sea algo así como

let
  x = [Column]
in
  x //or any further transformation)                                                                                                

Los pasos adicionales después de x y antes de entrar requerirán que ese paso o variable termine con una coma, por lo que sería

let
  x = [Column],
  y = Text.Lower(x) //just a sample                                             
in
  y //or any other transformation                                                                                       

así que ofreces escribir 1000 si las declaraciones en lugar de simplemente poner variable al nombre? Necesito poner variable entre corchetes, pero no escribir declaraciones ifs de 1000s, ya que no será dinámico si aparece un nuevo countrie

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.