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

Conteo de fechas

Hola!

Tengo una tabla con ordenes de servicio, estas ordenes tienen dos columnas con fechas, una agendada y la otra cuando se ejecutó. Necesito dentro de la visualización filtrar un rango de fechas y que me calcule cuantas ordenes de servicio se agendaron para ese rango y cuantas se ejecutaron. Hasta ahora solo he logrado que me arroje la cantidad de ordenes ejecutadas ya que esta es la fecha principal para todo el modelo de datos.

 

Muchas gracias.

Saludos!

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have created a sample for your reference, please check the following steps as below.

1. Create a date table as below and make it related to the fact table like that.

date = CALENDAR(DATE(2019,01,01),DATE(2019,01,31))

rel.PNG

 

2, Based on that, create two meausres as below to get the excpted result.

end = CALCULATE(COUNTROWS('Table'),USERELATIONSHIP('Table'[end date],'date'[Date]))
start = COUNTROWS('Table')

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have created a sample for your reference, please check the following steps as below.

1. Create a date table as below and make it related to the fact table like that.

date = CALENDAR(DATE(2019,01,01),DATE(2019,01,31))

rel.PNG

 

2, Based on that, create two meausres as below to get the excpted result.

end = CALCULATE(COUNTROWS('Table'),USERELATIONSHIP('Table'[end date],'date'[Date]))
start = COUNTROWS('Table')

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.