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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
thampton
Helper III
Helper III

conteo de ocurrencias por mes

Tengo esta medida creada para calcular las ocurrencias de un valor en el conjunto de datos. También tengo una columna de fecha en el conjunto de datos. Si quisiera que la medida contara las ocurrencias por MES, ¿cómo editaría esto? ¿O hay una mejor manera de hacer eso?

Ocurrencias : COUNTX(FILTER('Table',EARLIER('Table'[Column])'Table'[Column]),'Table'[Column])
1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hola @thampton

Prueba algo como esto:

Column = 

CALCULATE(

    COUNT('Table'[Client_ID]),

    FILTER('Table',

    'Table'[Month]=EARLIER('Table'[Month])),

    FILTER('Table',

        'Table'[Client_ID]=EARLIER('Table'[Client_ID])))

05.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hola @thampton

Prueba algo como esto:

Column = 

CALCULATE(

    COUNT('Table'[Client_ID]),

    FILTER('Table',

    'Table'[Month]=EARLIER('Table'[Month])),

    FILTER('Table',

        'Table'[Client_ID]=EARLIER('Table'[Client_ID])))

05.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@thampton, como

Ocurrencias: COUNTX(FILTER('Table',month(EARLIER('Table'[Date]))-month('Table'[Column])),'Table'[Column])

Agregue la columna si es necesario


Ocurrencias : COUNTX(FILTER('Table',EARLIER('Table'[Column])'Table'[Column] && month(EARLIER('Table'[Date])-month('Table'[Column])),'Table'[Column])

Greg_Deckler
Super User
Super User

@thampton - Crearía una nueva columna calculada como:

Mes - MES([Fecha])

A continuación, puede colocar Mes en un objeto visual y simplemente usar una agregación de recuento estándar en cualquier otra columna.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.