
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create incremental variable in load script.
I'm trying to create a variable in my load script to determine which nth bucket something falls into. For example, my table is currently like this:
Project|Day|Phase|Number of Days in Phase|Day Number|
Project1|1/1/2023|Development|30|1
Project1|1/2/2023|Development|30|2
Project1|1/3/2023|Development|30|3
Project1|1/4/2023|Development|30|4
....
Project1|1/31/2023|Production|100|1
Project1|2/1/2023|Production|100|2
...
Project2|3/15/2023|Development|15|1
Project2|3/16/2023|Development|15|2
Etc.
The other columns are either in my database I'm pulling information from, but I'm not sure how to best calculate the final column. Thanks!
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Got it to work: Here's the final result that worked
IF(Project=Peek(Project) and [Phase] = peek([Phase]) ,
peek(DayNumberOfPhase1)+1,1) as DayNumberOfPhase1
It also requires ordering the table based on project and date.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
AutoNumber(Phase & '|' & Project) as [Day Number]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This didn't work, it counted every day in the phase + project as 1, then the next phase as 2, etc., so it looked like this:
Project1|1/1/2023|Development|30|1
Project1|1/2/2023|Development|30|1
Project1|1/3/2023|Development|30|1
Project1|1/4/2023|Development|30|1
....
Project1|1/31/2023|Production|100|2
Project1|2/1/2023|Production|100|2
...
Project2|3/15/2023|Development|15|3
Project2|3/16/2023|Development|15|3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Got it to work: Here's the final result that worked
IF(Project=Peek(Project) and [Phase] = peek([Phase]) ,
peek(DayNumberOfPhase1)+1,1) as DayNumberOfPhase1
It also requires ordering the table based on project and date.
