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
Anonymous
Not applicable

Larga toma de decisiones árboles usando si entonces dese?

Hola expertos en PowerBI,


Tengo una pregunta simple pero importante y práctica:

¿Cuál es la mejor manera de calcular una nueva columna basada en un número de condiciones if? Por favor, vea el código a continuación - esto se basa en una toma de decisiones de árbol largo.
Funciona bien, pero su feo y no es bueno para tareas de mantenimiento. ¿Cuál es la forma de calcular esta columna chicos?


My_New_Col
IF(LEN([ColA])-0;
IF(ISBLANK([ColB]);
IF(LEN([ColC])-0;
IF([ColD]-"Abrir");
[ColE];
IF(LEN([ColF])-0;
IF(LEN([ColG])-0;
"Datos faltantes";
[ColG]);
RELACIONADO('Table_more_data'[ColF])));
[ColC];

IF(CONTAINSSTRING(RELATED('Table_more_data2'[ColA]);" xyz");" Esperando";" Sin trato));
[ColA]
)

Gracias de antemano por su ayuda. ¡Sigue con el buen trabajo!
Comentario: LEN e ISBLANK se utilizan debido a las columnas int y string

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hola @UnknownQ ,

Puede consultar este blog:https://community.powerbi.com/t5/Community-Blog/SWITCH-True-Logic-In-Power-BI-What-s-Possible-With-T...

Saludos
Liang
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Greg_Deckler
Super User
Super User

Vaca bendita, utilice SWITCH (TRUE()...)


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.