Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hola, tengo problemas al crear condicionales, tengo las columnas de Carga (texto), tipo de entrega ( C, A, En blanco), y tengo que desarrollar 4 condicionales,
1) Si tiene carga (ya que puede estar en blanco) y tiene tipo de entrega con status En blanco tiene que arrojar que esta ruteado
2) si no tiene carga (en blanco) y tipo de entrega en blanco eso sera igual a "pendiente de ruteo"
3) si tiene carga mas tiene status C es igual a "facturado"
4) si tiene carga y tiene estatus A es igual a "En preparación"
como puedo hacer esto? escribiendolo en una medida?
De antemano muchas gracias
Solved! Go to Solution.
Hi @Anonymous
Both Power Query and DAX can create a conditional column.
This is an example with Power Query M code. You can add a custom column with below code.
if [Carga] <> "" and [Delivery type] = "" then "Result A" else if [Carga] = "" and [Delivery type] = "" then "pendiente de ruteo" else if [Carga] <> "" and [Delivery type] = "C" then "facturado" else if [Carga] <> "" and [Delivery type] = "A" then "En preparación" else null
And this is an example with DAX.
Result =
SWITCH(TRUE(),
[Carga]<>"" && [Delivery type]="","Result A",
[Carga]="" && [Delivery type]="","Result B",
[Carga]<>"" && [Delivery type]="C","Result C",
[Carga]<>"" && [Delivery type]="A","Result D",
BLANK()
)
You can modify above code per your need. I don't understand Spanish well so my examples perhaps don't 100% match your need.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Anonymous
Both Power Query and DAX can create a conditional column.
This is an example with Power Query M code. You can add a custom column with below code.
if [Carga] <> "" and [Delivery type] = "" then "Result A" else if [Carga] = "" and [Delivery type] = "" then "pendiente de ruteo" else if [Carga] <> "" and [Delivery type] = "C" then "facturado" else if [Carga] <> "" and [Delivery type] = "A" then "En preparación" else null
And this is an example with DAX.
Result =
SWITCH(TRUE(),
[Carga]<>"" && [Delivery type]="","Result A",
[Carga]="" && [Delivery type]="","Result B",
[Carga]<>"" && [Delivery type]="C","Result C",
[Carga]<>"" && [Delivery type]="A","Result D",
BLANK()
)
You can modify above code per your need. I don't understand Spanish well so my examples perhaps don't 100% match your need.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
31 | |
31 | |
20 | |
15 | |
12 |
User | Count |
---|---|
20 | |
19 | |
16 | |
10 | |
9 |