Forum Discussion
Time between date
Hi,
I need to get the time in minutes between two dates like this : 13/02/2020 17:04.00. The first and the last of my table.
I also need to calculate the time when a parameters is null. I have a column for the date and another for the parameters.
Thanks for your help
16 Replies
- AlexAlberga727Resolver II
Total Time Diff = VAR StartDate = MIN( 'Table'[StartDate] ) VAR EndDate = MAX( 'Table'[EndDate] ) RETURN DATEDIFF( StartDate , EndDate , MINUTE )Give it a thumbs up! 😃
- az38Community Champion
- AnonymousNot applicable
If you want column then use below dax.
Column=datediff(Date1,Date2,Minute)
If you want dynamic values as per slicers create measure.
Measure=Datadiff(Min(Table[Date1]),Min(Table[Date2]),minute)
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos. - admiFrequent Visitor
Hi,
By null, I mean '0'.
Thanks
- az38Community Champion
how do you want o calculate this 0? as current date?
if so, try to use modificated AlexAlberga727 solution
Total Time Diff = VAR StartDate = MIN( 'Table'[StartDate] ) VAR EndDate = IF(EndDate = 0, TODAY(), MAX( 'Table'[EndDate] )) RETURN DATEDIFF( StartDate , EndDate , MINUTE )