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
Syndicate_Admin
Administrator
Administrator

DAX para sumar los valores de "Distinctcount".

Supongamos que tiene los siguientes datos y está creando una relación con la tabla Calendario.

51507.jpg

El visual de matriz utiliza DAX ("medida") para contar el número único de cada categoría.

measure = DISTINCTCOUNT(Table1[category])

Actualmente, estamos mostrando el número total de valores únicos (A, B, C = 3), pero originalmente nos gustaría mostrar el número total de valores únicos (3 + 2 + 2 + 1 = 😎 para cada mes.

151834.jpg 52740.jpg

Si tiene alguna buena idea sobre cómo hacer que esto suceda, ¿podría hacérmelo saber?

Saludos

Lopez

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@Lopez0090

Por favor, pruebe esta medida

Dcount = 
SUMX(
    SUMMARIZE(Table1,Table1[Year],Table1[Month Number]),
    calculate(DISTINCTCOUNT(Table1[Category]))
)

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@Lopez0090

Por favor, pruebe esta medida

Dcount = 
SUMX(
    SUMMARIZE(Table1,Table1[Year],Table1[Month Number]),
    calculate(DISTINCTCOUNT(Table1[Category]))
)

¡Genio! Muchas 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.