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.
Hola a todos, estoy tratando de crear lógica para una nueva columna Tipo de cliente:
Clasificación de tipo de cliente -> Interior, Exterior, Ambos
Tenga en cuenta que quiero ignorar a todos los clientes con Estado que contiene el texto "Actual"
Cliente | Estado | Tipo de producto | Tipo de cliente (columna deseada) |
A | Prueba | Interior | Al aire libre |
A | Actual1 | Al aire libre | Al aire libre |
A | Actual2 | Al aire libre | Al aire libre |
B | Actual1 | Interior | Interior |
B | Prueba | Interior | Interior |
B | Actual2 | Interior | Interior |
C | Actual1 | Al aire libre | Ambos |
C | Actual2 | Ambos | |
C | Actual 3 | Interior | Ambos |
¿Podría alguien ayudarme a averiguar cómo implementar esta lógica en una nueva columna? ¡Gracias!
@jack421 probar algo como esto, agregue esto como una columna
Pregunte cualquier cosa Power BI. Reserva una cita para una consulta gratuita en https://www.perytus.com
Customer Type =
VAR __indoor =
COUNTROWS(
CALCULATETABLE(
VALUES ( Customer[Product type] ),
ALLEXCEPT ( Customer, Customer[Customer] ),
Customer[Product type] = "Indoor" ,
CONTAINSSTRING( Customer[Status] , "Actual" )
)
)
VAR __outdoor =COUNTROWS(
CALCULATETABLE(
VALUES ( Customer[Product type] ),
ALLEXCEPT ( Customer, Customer[Customer] ),
Customer[Product type] = "Outdoor" ,
CONTAINSSTRING( Customer[Status] , "Actual" )
)
)
RETURN
SWITCH ( TRUE(),
__indoor = 1 && __outdoor = 1, "Both",
__indoor = 1, "Indoor",
__outdoor = 1, "Outdoor"
)
Apreciaría Kudos 🙂 si mi solución me ayudara.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@jack421 cliente A supone ser Ambos, ¿no?
Pregunte cualquier cosa Power BI. Reserva una cita para una consulta gratuita en https://www.perytus.com
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k no, quiero ignorar dónde estado - Prueba, sólo quiero ver donde Estado contiene el texto "Real"
Hola @jack421 ,
Pruebe este código:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |