cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chdelgado
New Member

Modelado de datos con varias columnas de fecha

Hola a todos,

Tengo el siguiente modelo de datos y me gustaría saber cómo calcular los siguientes

DataModel.png

Example1.png

3 REPLIES 3
v-yuaj-msft
Community Support
Community Support

Hola @chdelgado ,

En función de su descripción, puede hacerlos algunos pasos a continuación.

  • Uso de columnas calculadas:
Real StartDate_column á MINX(FILTER(ALL('Task Manager'), 'Task Manager'[ID Project] ? EARLIER('Task Manager'[ID Project])&&'Task Manager'[Task]<-EARLIER('Task Manager'[Task])), 'Task Manager'[Start Date])

Real EndDate_column : MAXX(FILTER(ALL('Task Manager'), 'Task Manager'[ID Project] á EARLIER('Task Manager'[ID Project])), 'Task Manager'[End Date])

Diff vs StartDates_measure - VALUE([Real StartDate_measure]-MAXX(FILTER(ALL('Project'),[ID Project]-SELECTEDVALUE('Task Manager'[ID Project])),[Schedule Start Date]))

Diff vs EndDates_measure - VALUE([Real EndDate_measure]-MAXX(FILTER(ALL('Project'),[ID Project]-SELECTEDVALUE('Task Manager'[ID Project])),[Schedule End Date]))

  • Uso de medidas:
Real StartDate_measure á MINX(FILTER(ALL('Task Manager'), 'Task Manager'[ID Project] ? SELECTEDVALUE('Task Manager'[ID Project])&&'Task Manager'[Task]<-MAX('Task Manager'[Task Manager])), 'Task Manager'[Start Date])

Real EndDate_measure á MAXX(FILTER(ALL('Task Manager'), 'Task Manager'[ID Project] ? SELECTEDVALUE('Task Manager'[ID Project])), 'Task Manager'[End Date])

Diff vs StartDates_measure - VALUE([Real StartDate_measure]-MAXX(FILTER(ALL('Project'),[ID Project]-SELECTEDVALUE('Task Manager'[ID Project])),[Schedule Start Date]))

Diff vs EndDates_measure - VALUE([Real EndDate_measure]-MAXX(FILTER(ALL('Project'),[ID Project]-SELECTEDVALUE('Task Manager'[ID Project])),[Schedule End Date]))

Resultado:

v-yuaj-msft_0-1606701524447.png

v-yuaj-msft_1-1606701524452.png

Espero que eso sea lo que estabas buscando.

Saludos

Yuna

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

AllisonKennedy
Super User III
Super User III

Real StartDate á MINX(FILTER(ALL(TaskManager), TaskManager[ID Project] ? EARLIER(TaskManager[ID Project])), TaskManager[Start Date])

Diff vs StartDates á TaskManager[Real StartDate] - RELATED(Projects[ScheduleStartDate])

A continuación, la fecha de finalización seguiría el mismo patrón:

Real EndDate MAXX(FILTER(ALL(TaskManager), TaskManager[ID Project] á EARLIER(TaskManager[ID Project])), TaskManager[End Date])

Diff vs EndDates = TaskManager[Real EndDate] - RELATED(Projects[ScheduleEndDate])



?? Check out my March Madness Report??


Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 


If you found this post helpful, please give Kudos. ?


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


www.excelwithallison.com

Hey, im tratando de usar esta medida pero me da un error con la función EARLIER, no me deja poner ninguna columna allí

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Kudoed Authors