Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I've read a blog by Alberto Ferrari saying that Earlier () should not be used and instead a variable should be created, but I cannot get it to work.
Here is the working code using Earlier to find the start date in the next row:
Solved! Go to Solution.
Try deleting the .[Date] in red font below
StartDateNextStep_with_variable = var CurrentCreatedOn = 'Workflow ActivityHistory'[CreatedOn].[Date]var CurrentDocumentInstanceId = 'Workflow ActivityHistory'[DocumentInstanceId] RETURN Calculate(min('Workflow ActivityHistory'[CreatedOn]), filter('Workflow ActivityHistory', 'Workflow ActivityHistory'[DocumentInstanceId] = CurrentDocumentInstanceId && 'Workflow ActivityHistory'[CreatedOn] > CurrentCreatedOn ) )
Try deleting the .[Date] in red font below
StartDateNextStep_with_variable = var CurrentCreatedOn = 'Workflow ActivityHistory'[CreatedOn].[Date]var CurrentDocumentInstanceId = 'Workflow ActivityHistory'[DocumentInstanceId] RETURN Calculate(min('Workflow ActivityHistory'[CreatedOn]), filter('Workflow ActivityHistory', 'Workflow ActivityHistory'[DocumentInstanceId] = CurrentDocumentInstanceId && 'Workflow ActivityHistory'[CreatedOn] > CurrentCreatedOn ) )
Removing .[date] worked, thank you. I didn't even notice that intellisense had added this.
User | Count |
---|---|
41 | |
27 | |
23 | |
19 | |
16 |
User | Count |
---|---|
55 | |
35 | |
21 | |
18 | |
15 |