No Event Id's
Event Id and Next Event Id are required fields in From Visuals Process Chart, but not all processes actually contain them. In these cases, you need to calculate them yourself. The easiest way is to create a calculated column and use a DAX expression.
Calculate next event Id
Here’s a simple example of daily delivery routes for trucks, that are linear processes where the 'Next Event Id' is not provided in the data, but a sequential number 'Event Id' is ('Stop Id' in this case).
We can simply calculate the next largets 'Stop Id' to each row.
Copy the DAX-code here and edit it to fit your data:
Next Stop Id =
// Calculate next id in linear process
// Save current drive and stop id's to variables
VAR _processId = [Drive Id]
VAR _eventId = [Stop Id]
RETURN
// Calculate next stop id in the same drive
MINX(
FILTER(
'Data Modeling Example - Events',
'Data Modeling Example - Events'[Drive Id] = _processId
&& 'Data Modeling Example - Events'[Stop Id] > _eventId
),
'Data Modeling Example - Events'[Stop Id]
)
Now we have all required fields for Proces Chart.
Calculate event Id's from timestamp
In some cases there are no sequential Id, so we need to determine the process order in another way. Typically, a timestamp is available in these cases and can be used to establish the sequence.
Let's use the same example as above but without the sequential 'Stop Id'. In this case the 'Arrival Time' tells order of the process.
First, we need to convert the timestamp to a string or numeric format. Let's convert the datetime to a numeric value. This will give us a similar sequential number that can be used as the 'Event Id'
Event Id =
// Create numeric id from timestamp
VALUE( [Arrival Time] ) * 100
Then calculate 'Next Event Id' just like in the first example.
Next Event Id =
// Calculate next id in linear process
// Save current drive and Event id's to variables
VAR _processId = [Drive Id]
VAR _eventId = [Event Id]
RETURN
// Calculate next Event id in the same drive
MINX(
FILTER(
'Data Modeling Example - Events',
'Data Modeling Example - Events'[Drive Id] = _processId
&& 'Data Modeling Example - Events'[Event Id] > _eventId
),
'Data Modeling Example - Events'[Event Id]
)
Now we have all required fields for Proces Chart.