Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 18 | |
| 11 | |
| 10 |