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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Fecha de inicio vs Fecha de finalización

Hola a todos,

¿Puede ayudarme con una medida que calcule utilizando la siguiente lógica?

Ex11.png

No es necesario necesita un mes específico como el ejemplo, ¡Me gustaría mostrar los datos en una tabla usando los meses /cuartos/años de una tabla de calendario donde puedo ver el porcentaje de proyectos que comienza en un mes y termina en otro!

¡Gracias!

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hola @chdelgado ,

Puede crear una medida como se indica a continuación:

Measure = 
VAR _cursdate=MAX('Table'[Fecha Inicio])
VAR _startinsmonth= CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)))
VAR _startendnotinsmonth = CALCULATE(DISTINCTCOUNT('Table'[ID Actividad]),FILTER('Table', MONTH('Table'[Fecha Inicio])=MONTH(_cursdate)&&MONTH('Table'[Fecha Fin])<>MONTH(_cursdate)))
RETURN 
DIVIDE(_startendnotinsmonth,_startinsmonth)

Start date vs End Date.JPG

Saludos
Equipo de apoyo comunitario _ Rena Ruan
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más.

Community Support Team _ Rena
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

@chdelgado , Probar medidas como

% terminado en el mismo mes ? divide(countx(filter(Table, eomonth([start date],0) ? eomonth([end date],0)),Table[Task]), count(Table[Task]))


% terminado en diferentes Month - divide(countx(filter(Table, eomonth([start date],0) ? eomonth([end date],0)),Table[Task]), count(Table[Task]))

Anonymous
Not applicable

I tried with your measures and worked in some way, now it is giving me the right result, however if I list the tasks on a table, it is not showing me the ones that were not completed the same month, only the ones that did.

 

This is the data model, maybe you can have a better idea with this 

 

https://1drv.ms/x/s!Ag7DnkvMsR95szrMjdViLqwnK5NT?e=FQZdMw

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors