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 buscando una ayuda de DAX en el siguiente escenario:
Encuentra el no. equipos que sólo tiene el estatus "Pasado".
Gracias de antemano
Hola @tanisha10 Por favor, pruebe esta medida.
Measure =
VAR Passed =
FILTER ( Table1, Table1[Status] = "Passed" )
VAR Result =
SUMX (
Passed,
VAR Team = [Team]
RETURN
IF (
COUNTROWS (
FILTER ( Table1, Table1[Status] = "Failed" && Table1[Team] = Team )
) >= 1,
0,
1
)
)
RETURN
Result
Apreciar con felicitaciones.
Por favor, márquelo como solución si esto resuelve su problema.
Gracias
¿Podrías, por favor, despejar mi duda? Según su estado de datos, aprobado está presente en 5 equipos diferentes, así que ¿cómo podría su recuento llegar a ser 2?
Equipos que sólo ha pasado registros, ningún registro fallido es mi requisito. Ahora puede ver que el equipo "A" tiene el estado Aprobado y Fallido. Así que no estoy considerando el Equipo A en mi resultado. Solo el equipo "B" y el equipo "E" solo han pasado registros.
@tanisha10 , Probar como
countX(filter(summarize('Summerize table', 'Summerize table'[Team],"_1", count('Summerize table'[Team]), "_2",CALCULATE(count('Summerize table'[Team]),'Summerize table'[Status]'"Passed")) , [_1] á[_2]),[Team])
@tanisha10 siento malinterpretar la pregunta, aquí está la medida
Measure =
VAR __passedTeam = CALCULATETABLE ( VALUES ( 'Table'[Team] ), 'Table'[Status] = "Passed" )
VAR __failedTeam = CALCULATETABLE ( VALUES ( 'Table'[Team] ), 'Table'[Status] = "Failed" )
RETURN
COUNTROWS ( EXCEPT ( __passedTeam, __failedTeam ) )
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.⚡
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.
Muchas gracias Perry por su respuesta.
Pero me está dando 1 para diferentes escenarios que probé, como recuento distinto para "Pasado" y "Fallido" estado será siempre 1.
¿Sólo quería entender cómo esta función "except" está funcionando en la instrucción return?
@tanisha10 - Como una variación en @parry2k creo que podría hacer esto:
Measure =
VAR __passedTeam = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Status] = "Passed"),"Team",[Team]))
VAR __failedTeam = DISTINCT(SELECTCOLUMNS(FILTER('Table',[Status] = "Failed"),"Team",[Team]))
RETURN
COUNTROWS ( EXCEPT ( __passedTeam, __failedTeam ) )
Básicamente lo mismo fue @parry2k. Obtienes todos los identificadores de equipo que tienen un estado de aprobado en cualquier lugar. Lo mismo para fracasó. Por lo tanto, cuando usa EXCEPT, filtra los equipos que han fallado. Por lo tanto, solo te quedan equipos que nunca han fallado y los cuentas.
@tanisha10 no está claro de su respuesta si su problema está resuelto o no? ¿Puede aclararlo, por favor?
Leer más sobre EXCEPT aquí.
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.⚡
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.
@tanisha10 añadir la siguiente medida
Success count = CALCULATE(DISTINCTCOUNT('Summerize table'[Team])'Summerize table'[Status]="Passed" )
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.⚡
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.
Esto está considerando los equipos con estatus fallido también, que no quiero.
Debe considerar sólo los equipos que sólo tiene registro pasado, no hay registros fallidos
@tanisha10 eso debería ser muy fácil
Count =
VAR __teams = CALCULATETABLE ( VALUES ( Table[Team] ), Table[Status] = "Passed" )
RETURN
COUNTROWS ( __teams )
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionadas con Power BI.⚡
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.
Gracias Perry por su respuesta. Pero me está dando los mismos resultados con todos los registros (Count-5) con el estado "pasado".
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 |