Forum Discussion
tmears
Helper III
8 years agoDATEDIFF working days but dates in different rows
I was wondering if anyone could help, v-jiascu-msft (ho is a star!, by the way) help me produced the following DAX: Bascially it looks at the pervious row if the entityid is the same and calculat...
- Anonymous8 years ago
tmears,
You can create a previoustime column using DAX below in your table, then calculate the working hours between createdon column and previoustime column following the guide in this video. You would need to create extra tables such as date table and holiday table.previoustime = CALCULATE(FIRSTNONBLANK('msdyn_audithistories'[createdon],1),FILTER(msdyn_audithistories, msdyn_audithistories[msdyn_entityid]=EARLIER( msdyn_audithistories[msdyn_entityid]) && msdyn_audithistories[Index]=EARLIER(msdyn_audithistories[Index])-1))
Regards,
Lydia
Anonymous
8 years agoNot applicable
tmears,
You can create a previoustime column using DAX below in your table, then calculate the working hours between createdon column and previoustime column following the guide in this video. You would need to create extra tables such as date table and holiday table.
previoustime = CALCULATE(FIRSTNONBLANK('msdyn_audithistories'[createdon],1),FILTER(msdyn_audithistories, msdyn_audithistories[msdyn_entityid]=EARLIER( msdyn_audithistories[msdyn_entityid]) && msdyn_audithistories[Index]=EARLIER(msdyn_audithistories[Index])-1))
Regards,
Lydia