Forum Discussion
elliottcarver
6 years agoFrequent Visitor
Complex DAX Calculation - Event Log Cycle Times for Process Mining
Trying to create a model for cycle-time reporting that allows a report-user to know how often the time between any two steps met a variable target. I want report users to input the following vari...
Anonymous
6 years agoNot applicable
Hi elliottcarver ,
You could try something like this:
Measure =
countx(
summarize(
'Table',
'Table'[Case]
, "Duration",
DATEDIFF(Min('Table'[Date]), Max('Table'[Date]), DAY)+1
),
if ([Duration]<=[Parameter Value],1)
)
This is roughly the same as you pseudo code 🙂 [Parameter Value] is a What-If parameter for your DayTarget
jan
elliottcarver
6 years agoFrequent Visitor
Thanks for your reply JustJan!! I'm making headway on this initiative, but having trouble coming up with the best way to refer to my dynamic Step A and Step B selected variable. Currenly [Duration] evaluates to 0 for every record
This is my table function:
Table 1 =
summarize(
'Change Log Entry - Process Mining Entry',
'Change Log Entry - Process Mining Entry'[Primary Key Field 2 Value],
"Duration",
DATEDIFF(
CALCULATE(
Min('Change Log Entry - Process Mining Entry'[Date]),
filter(
'Change Log Entry - Process Mining Entry',
'Change Log Entry - Process Mining Entry'[Process Mining Step Index]=[Step A Selection])
),
CALCULATE(
Min('Change Log Entry - Process Mining Entry'[Date]),
filter(
'Change Log Entry - Process Mining Entry',
'Change Log Entry - Process Mining Entry'[Process Mining Step Index]=[Step B Selection])
),
DAY)
)
Step A Selection = SELECTEDVALUE('Step A'[Process Mining Step Index])