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
ghe7549
Helper III
Helper III

contar sis

Estoy tratando de contar el número de pisos por edificio por instalación. Estoy usando dos medidas para obtener esto, pero no está funcionando

Recuento de instalaciones : COUNTROWS('instalaciones públicas')
CALCULATE('Measure Table'[Facility Count],'public buildings'[id],'public floors'[id])

ghe7549_0-1608319753064.png

Cualquier ayuda sería muy apreciada.

4 REPLIES 4
ghe7549
Helper III
Helper III

@AllisonKennedy Creé el recuento de medidas de floor ( COUNTA('public facilities'[name]) ). Si aún así sigues teniendo problemas, problema desconocido. Si nos fijamos en el primero hay 2 garajes con 6 plantas cada uno. Necesito que sea North Garage 6 pisos y West Garage 6 pisos.

ghe7549_0-1608560690946.png

@ghe7549 Esto se debe a que todavía tiene [Floor] en la mesa. Un par de cosas que puede hacer, ya sea use un objeto visual de matriz en su lugar para obtener los subtotales;

[Recuento de pisos] en valores

[Facilidad] en filas

[Construyendo] en Filas

[Piso] en Filas

Expanda hacia abajo a todos los niveles usando las flechas conectadas dobles (parece un tipo de horquilla de) en la parte superior de la matriz.

o actualice su medida:

Recuento de todos los pisos : CALCULATE(COUNTA(«instalaciones públicas»[nombre]) , ALL('public facilities'[floor]))


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

AllisonKennedy
Super User
Super User

@ghe7549 El countifs en DAX se reduce a cómo lo usas, si quieres contar el número de pisos, simplemente crea una medida:

Recuento de pisos - COUNTA('instalaciones públicas'[nombre])

A continuación, coloque esto en un objeto visual de tabla o matriz. Si utiliza una matriz, ponga:

[Recuento de pisos] en valores

[Facilidad] en filas

[Construyendo] en Filas

Si utiliza una tabla, simplemente colóquelos en este orden:

[Facilidad]

[Edificio]

[Recuento de pisos]

Si desea un recuento distinto, utilice @camargos88 fórmula.

También puede utilizar la fórmula COUNTROWS que ya ha creado si desea incluir valores en blanco en el recuento.

¿Espero que tenga sentido?


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

camargos88
Community Champion
Community Champion

@ghe7549 ,

¿Ha probado DISTINCTCOUNT('public facilities'[name]) ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



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.