Forum Discussion
Marcin
Helper V
8 years agoDatediffbyRows
Hi, I am looking for solution to calculate DAYs difference between Process1 date and Process3 date for each project in calculated column. Project ...
- 8 years ago
Hi Marcin,
Try this measure please.
Measure = VAR p1Date = CALCULATE ( MIN ( 'Table1'[Date] ), FILTER ( ALLEXCEPT ( Table1, 'Table1'[ProjectID] ), 'Table1'[ProcessName] = "Process1" ) ) VAR p3Date = CALCULATE ( MIN ( 'Table1'[Date] ), FILTER ( ALLEXCEPT ( 'Table1', Table1[ProjectID] ), 'Table1'[ProcessName] = "Process3" ) ) RETURN DATEDIFF ( p1Date, p3Date, DAY )Best Regards,
Dale
v-jiascu-msft
Microsoft Employee
8 years agoHi Marcin,
Try this measure please.
Measure =
VAR p1Date =
CALCULATE (
MIN ( 'Table1'[Date] ),
FILTER (
ALLEXCEPT ( Table1, 'Table1'[ProjectID] ),
'Table1'[ProcessName] = "Process1"
)
)
VAR p3Date =
CALCULATE (
MIN ( 'Table1'[Date] ),
FILTER (
ALLEXCEPT ( 'Table1', Table1[ProjectID] ),
'Table1'[ProcessName] = "Process3"
)
)
RETURN
DATEDIFF ( p1Date, p3Date, DAY )
Best Regards,
Dale
Marcin
Helper V
8 years agoHi,
thanks for help, that work for me, but I had to remove ALLEXCEPT function so that it would work when I used measure in Project column.