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
Anonymous
Not applicable

Cuente NewCustomers basado en un período de tiempo de 30 días en una dimensión de cambio lento

Hola

Tengo una tabla SCD (dimensión que cambia lentamente)

Esta tabla tiene una fila para cada cliente para cada mes (siempre y cuando esté activo)

Para cada mes quiero mostrar el recuento de NewCustomers si ese cliente no existe en la tabla del mes anterior

El cliente necesita ser contado sólo los

Id

AccountID

SubscriptionDate

Contar

1

1001

1/1/2020

1

2

1002

1/1/2020

1

3

1003

1/1/2020

1

4

1004

1/1/2020

1

5

1002

2/1/2020

1

6

1003

2/1/2020

1

7

1004

2/1/2020

1

8

1001

3/1/2020

1

9

1002

3/1/2020

1

10

1001

4/1/2020

1

11

1002

4/1/2020

1

12

1003

4/1/2020

1

13

1004

4/1/2020

1

Resultados esperados:

Enero

Febrero

Marzo

Abril

Contar

4

0

1

2

1 REPLY 1
camargos88
Community Champion
Community Champion

Hola @joshuar ,

Puede probar esta medida:

NewCustomer ??
VAR _currentMonth á SELECTEDVALUE('Table'[SubscriptionDate])
VAR _selectedMonth - EOMONTH(_currentMonth, -2) + 1
DEVOLVER COUNTROWS(EXCEPTO(
SELECTCOLUMNS(FILTER(ALL('Table'), 'Table'[SubscriptionDate] á _currentMonth), "AccountID", 'Table'[AccountID]),
SELECTCOLUMNS(FILTER(ALL('Table'), 'Table'[SubscriptionDate] á _selectedMonth), "AccountID", 'Table'[AccountID])
))
Capture.PNG


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.