Forum Discussion
redbrumby
8 years agoRegular Visitor
Calculate date difference between first and last date by ID
Hi, I have a dataset (much larger and not filtered however) which looks like the following: Event Date ID 26/07/2016 7076341 26/07/2016 7055292 2/08/2016 7055292 20/09/20...
- 8 years ago
HI redbrumby
This calculated table may give you want you want. I have attached a simple PBIX file
Table = SUMMARIZECOLUMNS( 'Table1'[ID] , "Min Date" , MIN('Table1'[Event Date]) , "Max Date" , MAX('Table1'[Event Date]) , "Date Diff" , DATEDIFF( MIN('Table1'[Event Date]), MAX('Table1'[Event Date]),DAY) )
Phil_Seamark
Microsoft Employee
8 years agoHI redbrumby
This calculated table may give you want you want. I have attached a simple PBIX file
Table =
SUMMARIZECOLUMNS(
'Table1'[ID] ,
"Min Date" , MIN('Table1'[Event Date]) ,
"Max Date" , MAX('Table1'[Event Date]) ,
"Date Diff" , DATEDIFF( MIN('Table1'[Event Date]), MAX('Table1'[Event Date]),DAY)
)