Forum Discussion
ArchStanton
4 years agoPower Participant
Previous Date Offset - DAX Calculated Column
Hi, I have been using the link below to hopefully fix an issue where I need to calculate the DAYSBETWEEN the ActualStartDate & ActualEndDate using a calculated column. My problem is when the da...
ArchStanton
4 years agoPower Participant
Pseudo Days =
VAR _countrowsID =
COUNTROWS ( FILTER ( Deferrals, Deferrals[regardingobjectid] = EARLIER ( Deferrals[Regardingobjectid] ) ) )
VAR _numberingrowsID =
COUNTROWS (
FILTER (
Deferrals,
Deferrals[Regardingobjectid] = EARLIER ( Deferrals[Regardingobjectid] )
&& Deferrals[ActualStart] <= EARLIER ( Deferrals[ActualStart] )
)
)
VAR _networkdaysAB =
NETWORKDAYS ( Deferrals[Case Received], Deferrals[ActualStart] )
VAR _previousrowactualend =
MAXX (
FILTER (
Deferrals,
Deferrals[Regardingobjectid] = EARLIER ( Deferrals[Regardingobjectid] )
&& Deferrals[ActualStart] < EARLIER ( Deferrals[ActualStart] )
),
Deferrals[ActualEnd]
)
VAR _networkdaysCB =
NETWORKDAYS ( _previousrowactualend, Deferrals[ActualStart] )
VAR _networkdaysAC =
NETWORKDAYS ( Deferrals[Case Received], Deferrals[ActualEnd] )
RETURN
SWITCH (
TRUE (),
_countrowsID = 2, IF ( _numberingrowsID = 1, _networkdaysAB, _networkdaysCB ),
_networkdaysAC
)v-yanjiang-msft
4 years agoCommunity Support
Hi ArchStanton ,
Is your problem solved? If so, would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here, thank you!
Best Regards,
Community Support Team _ kalyj