Forum Discussion
Need help with the Datediff functionality
- Anonymous8 years ago
Hi,
I tried different ways to calculate the date difference between two diffrent rows of two different colunms but I couldn't for abvious reasons. So we changed the underlying data to reflect that for any given task we shall have the start and the finish date for the corresponding taskname which are associated with the primary key(projectid). Then I can compute the date difference normally. For now this is the alternative workaround for this issue.
Thanks
Sridhar
Anonymous
Try this Formula:
DATEDIFF(TaskStartDate,TaskFinishDate,Day)
-Hemal
- Anonymous8 years agoNot applicable
Anonymous I tried that but the issue I am facing is that I need the datediff between taskname1-taskstartdate and taskname2-taskfinishdate. If I use the above formula it would only give me the date difference between taskname1-taskstartdate and taskfinishdate. I wrote a DAX query but I am not getting any output
Duration_Metric7 = DATEDIFF((IF('Tasks-Metric7'[TaskName]="Taskname2",'Tasks-Metric7'[TaskFinishDate].[Date])),(IF('Tasks-Metric7'[TaskName]="Taskname1",'Tasks-Metric7'[TaskStartDate] .[Date])),DAY)
Please let me know if you can tweak the above formula to compute the difference. Any help would be appreciated.
- Anonymous8 years agoNot applicable
Hi,
I tried different ways to calculate the date difference between two diffrent rows of two different colunms but I couldn't for abvious reasons. So we changed the underlying data to reflect that for any given task we shall have the start and the finish date for the corresponding taskname which are associated with the primary key(projectid). Then I can compute the date difference normally. For now this is the alternative workaround for this issue.
Thanks
Sridhar