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
xliu1
Helper II
Helper II

Recuento condicional para una columna de categoría

Soy muy nuevo en Power BI. Intento hacer un recuento condicional para una columna de categoría, y aquí está mi sintaxis. COURSE_MODALITY es la tabla y GRADE_AWARDED es la columna. Quiero contar el número de calificaciones en todas esas categorías. Recibo este mensaje de error: se pasaron demasiados argumentos a la función RELACIONADA. El número máximo de argumentos para la función es 1. ¿Cómo debo modificar la sintaxis? ¡Gracias!

DF Grades = COUNTAX(FILTER(COURSE_MODALITY,RELATED([GRADE_AWARDED] IN {"D","D+","D-","F","U"},)))

1 ACCEPTED SOLUTION
pranit828
Community Champion
Community Champion

Hola @xliu1

Df Grados - calculate(COUNT(COURSE_MODALITY[GRADE_AWARDED]),COURSE_MODALITY[GRADE_AWARDED] IN "D","D+","D-","F","U"-)


¿Resolví tu problema? ¡Marca mi puesto como una solución! Apreciamos sus Felicitaciones, Pulse el botón pulgares hacia arriba !!

saludos
Pranit





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

3 REPLIES 3
pranit828
Community Champion
Community Champion

Hola @xliu1

Df Grados - calculate(COUNT(COURSE_MODALITY[GRADE_AWARDED]),COURSE_MODALITY[GRADE_AWARDED] IN "D","D+","D-","F","U"-)


¿Resolví tu problema? ¡Marca mi puesto como una solución! Apreciamos sus Felicitaciones, Pulse el botón pulgares hacia arriba !!

saludos
Pranit





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
amitchandak
Super User
Super User

@xliu1, intenta como

Grados DF - COUNTAX(FILTER(COURSE_MODALITY,RELATED([GRADE_AWARDED]) IN ''D'',"D+","D-","F","U"'))

O

Df Grados - countrows(FILTER(COURSE_MODALITY,RELATED([GRADE_AWARDED]) IN 'D","D+","D-","F","U"-))

Hola @amitchandak gracias por su pronta respuesta. Probé ambas sintaxis. El primero todavía me da el mismo mensaje de error. El 2o me da el mensaje: function RELATED espera una referencia de columna completa como argumento. ¿Alguna idea? ¡Gracias!

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.