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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Simplificar la fórmula en el editor avanzado (Power Query)

Hola a todos

Tengo problemas con mi conjunto de datos, debido a mis pasos agregados en power Query.
Sé que hice algunos pasos que podrían ser más eficientes, pero necesito ayuda con eso.

Al igual que la función a continuación, todos los produktID, deberían llamarse "Koop" (la palabra holandesa para "Comprar"), pero no puedo chenge la fórmula, ¿tiene la solución para esto?

#"Tipo de producto" = Table.AddColumn(#"Tipo modificado", "Tipo de producto",
Compra
cada uno si [PRODUKTID] = 5005112 entonces "Koop"
else if [PRODUKTID] = 5005114 then "Koop"
else if [PRODUKTID] = 5005115 then "Koop"
else if [PRODUKTID] = 5005117 then "Koop"
else if [PRODUKTID] = 5005185 then "Koop"
else if [PRODUKTID] = 5005186 then "Koop"
else if [PRODUKTID] = 5005187 then "Koop"
else if [PRODUKTID] = 5005188 then "Koop"
else if [PRODUKTID] = 5005189 then "Koop"
else if [PRODUKTID] = 5011492 then "Koop"
else if [PRODUKTID] = 5011493 then "Koop"
else if [PRODUKTID] = 5011494 then "Koop"
else if [PRODUKTID] = 5011563 then "Koop"

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@Sander1401, consulte la solución aquí, que parecen más eficientes

https://community.powerbi.com/t5/Desktop/IN-OPERATOR-in-PowerBi/m-p/174285

ejemplo

 if List.Contains({5005112 ,5005114 ,5005115 ,5005115 },[PRODUCTOS]) then "Compra"
else null

, agregar otros

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@Sander1401, consulte la solución aquí, que parecen más eficientes

https://community.powerbi.com/t5/Desktop/IN-OPERATOR-in-PowerBi/m-p/174285

ejemplo

 if List.Contains({5005112 ,5005114 ,5005115 ,5005115 },[PRODUCTOS]) then "Compra"
else null

, agregar otros

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.