Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola a todos
Estoy buscando alguna inspiración o una solución exacta para lograr clústeres de pasos de proceso. Mis datos son similares a los siguientes:
llave | Process_Name | orden |
1 | A | 10 |
1 | A | 40 |
1 | B | 30 |
1 | C | 20 |
1 | D | 50 |
2 | A | 10 |
2 | B | 40 |
2 | C | 30 |
2 | E | 20 |
3 | B | 10 |
3 | C | 20 |
3 | E | 30 |
4 | A | 10 |
4 | C | 20 |
4 | E | 30 |
La importancia del orden es para cada clave, el paso del proceso se completará de acuerdo con el campo Orden ordenado en orden ascendente. Por ejemplo, la secuencia real para la clave 1 es A - C - B - A.
Estoy buscando lograr lo siguiente a través de mis datos: una matriz / potencial (clúster) donde los valores en la matriz representan un recuento sobre todas las claves donde un paso de proceso procede a otro paso de proceso. Por ejemplo, el proceso de la clave 1 es A-C-B-A dando la matriz de lo siguiente:
A | B | C | |
A | 1 | ||
B | 1 | ||
C | 1 |
El resultado final de los datos de la muestra proporcionados será como tal:
A | B | C | D | E | |
A | 2 | 1 | 1 | ||
B | 1 | 1 | |||
C | 2 | 2 | |||
D | |||||
E | 1 |
Mi pregunta es doble:
Gracias, cualquier poco de orientación o consejo ayuda!
Solved! Go to Solution.
Key Count =
// Count the Keys where the current preceeding process
// is the direct ancestor of the current succeeding
// process (based on the Order column) in the current
// context. This means the measure is sensitive to
// any filters put on the T table.
var OnlyOneCombinationVisible = COUNTROWS( 'Process Pairs' ) = 1
var Result =
if( OnlyOneCombinationVisible,
var CurrentPrecedingProcess =
SELECTEDVALUE( 'Process Pairs'[Preceding Process] )
var CurrentSucceedingProcess =
SELECTEDVALUE( 'Process Pairs'[Succeeding Process] )
return
SUMX(
CALCULATETABLE(
SUMMARIZE(
T,
T[Key],
T[Order]
),
KEEPFILTERS(
T[Process] = CurrentPrecedingProcess
)
),
var CurrentKey = T[Key]
var CurrentOrder = T[Order]
var NextProcess =
MAXX(
TOPN(1,
FILTER(
T,
and(
T[Key] = CurrentKey,
T[Order] > CurrentOrder
)
),
T[Order],
ASC
),
T[Process]
)
return
if( NextProcess = CurrentSucceedingProcess, 1 )
)
)
return
Result
Key Count =
// Count the Keys where the current preceeding process
// is the direct ancestor of the current succeeding
// process (based on the Order column) in the current
// context. This means the measure is sensitive to
// any filters put on the T table.
var OnlyOneCombinationVisible = COUNTROWS( 'Process Pairs' ) = 1
var Result =
if( OnlyOneCombinationVisible,
var CurrentPrecedingProcess =
SELECTEDVALUE( 'Process Pairs'[Preceding Process] )
var CurrentSucceedingProcess =
SELECTEDVALUE( 'Process Pairs'[Succeeding Process] )
return
SUMX(
CALCULATETABLE(
SUMMARIZE(
T,
T[Key],
T[Order]
),
KEEPFILTERS(
T[Process] = CurrentPrecedingProcess
)
),
var CurrentKey = T[Key]
var CurrentOrder = T[Order]
var NextProcess =
MAXX(
TOPN(1,
FILTER(
T,
and(
T[Key] = CurrentKey,
T[Order] > CurrentOrder
)
),
T[Order],
ASC
),
T[Process]
)
return
if( NextProcess = CurrentSucceedingProcess, 1 )
)
)
return
Result
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |