Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Rabur116
Frequent Visitor

Recuento distinto de objetopor tipo y fecha

Hola

Tengo esta tabla donde necesito contar el número total general de objetos por fecha:

Nombre del objetoTipo de objetoFecha
abcvm1Ahv3/26/2020
abcvm2Vmw3/26/2020
bcdvm1Ahv3/25/2020
bcdvm1Ahv3/25/2020
bcdvm1Ahv3/24/2020
bcdvm1Vmw3/24/2020
cdwvm1Ahv3/24/2020

Un objeto debe contarse solo una vez al día si es del mismo tipo de objeto. La respuesta debe ser:

FechaAhvVmwTotal
3/26/2020112
3/25/2020101
3/24/2020213
Grand Total6

Estoy usando una visualización de "Tarjeta" para mostrar el Grand Total mientras filtro las fechas. Por favor, hágamelo saber la medida correcta que puedo utilizar para la "tarjeta".

¡Gracias de antemano!

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

v-easonf-msft
Community Support
Community Support

Hola , @Rabur116

Pruebe los pasos como se indica a continuación:

1.crear una tabla de cálculo:

Table 2 = DISTINCT('Table'[Object Type])

2.crear una medida como abajo

value1 =
SUMX (
    GROUPBY (
        FILTER ( 'Table', 'Table'[Object Type] IN DISTINCT ( 'Table 2'[Object Type] ) ),
        'Table'[Date],
        'Table'[Object Type]
    ),
    IF (
        ISBLANK ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Object Name] ) ) ),
        0,
        CALCULATE ( DISTINCTCOUNT ( 'Table'[Object Name] ) )
    )
) + 0

Se mostrará como se muestra a continuación:

58.png

Aquí hay una demostración

pbix unido

Saludos
Equipo de Apoyo Comunitario _ Eason
Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

6 REPLIES 6
v-easonf-msft
Community Support
Community Support

Hola , @Rabur116

Pruebe los pasos como se indica a continuación:

1.crear una tabla de cálculo:

Table 2 = DISTINCT('Table'[Object Type])

2.crear una medida como abajo

value1 =
SUMX (
    GROUPBY (
        FILTER ( 'Table', 'Table'[Object Type] IN DISTINCT ( 'Table 2'[Object Type] ) ),
        'Table'[Date],
        'Table'[Object Type]
    ),
    IF (
        ISBLANK ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Object Name] ) ) ),
        0,
        CALCULATE ( DISTINCTCOUNT ( 'Table'[Object Name] ) )
    )
) + 0

Se mostrará como se muestra a continuación:

58.png

Aquí hay una demostración

pbix unido

Saludos
Equipo de Apoyo Comunitario _ Eason
Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Hola, tanto la solución de primera persona como su solución funcionan. Muchas gracias por la ayuda!

De nada.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Rabur116

Trate como

Sumx(summarize(Table[Date],table,[ Object Type]"_dist",distinct(Table[Object Name])),[_dist])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Ashish_Mathur
Super User
Super User

Hola

Puede descargar mi archivo PBI desde aquí.

Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

¡Tu solución funciona! Muchas gracias por la ayuda.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors