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.
Estoy usando Power BI conectándose a Salesforce para acceder al objeto Historial de campos de oportunidades (tabla). Me gustaría terminar con cada etapa una oportunidad golpea, en orden, en una sola fila para que luego pueda construir un diagrama de flujo para ilustrar tirar a través y caer.
Ejemplo de solución:
OppID | Etapa 1 | Etapa 2 | Etapa 3 | Etapa 4 | Etapa 5 |
ABC123 | Prospección | Calificación | Estimar | Proponiendo | Cierre |
La tabla de datos se configura para registrar los cambios en el nombre de la etapa, de modo que los datos se encuentren de la siguiente manera:
OppID | Fecha | Oldvalue | NewValue |
ABC123 | 1/1/2020 | Prospección | Calificación |
ABC123 | 1/2/2020 | Calificación | Estimar |
ABC123 | 1/3/2020 | Estimar | Proponiendo |
ABC123 | 1/4/2020 | Proponiendo | Cierre |
Cualquier ayuda con esto sería muy útil... He estado tratando de resolver esto por algún tiempo. ¡Gracias de antemano!
Hola @jdonovan ,
Puede hacer referencia al siguiente DAX:
Column =
RANKX (
FILTER ( 'Table', 'Table'[OppID] = EARLIER ( 'Table'[OppID] ) ),
'Table'[Date],
,
ASC,
DENSE
)
Table 2 =
SUMMARIZE (
'Table',
"ID", DISTINCT ( 'Table'[OppID] ),
"Stage 1", CALCULATE ( SELECTEDVALUE ( 'Table'[OldValue] ), 'Table'[Column] = 1 ),
"Stage 2", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 1 ),
"Stage 3", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 2 ),
"Stage 4", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 3 ),
"Stage 5", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 4 )
)
Aquí está el resultado de mi prueba.
Hola
Creo que podemos llevar a cabo algunas transformaciones en el Editor de consultas para resolver esto. ¿Se permiten trnsformations de Power Query cuando soruce directamente datos de SalesForce?
Hola @jdonovan ,
Puede hacer referencia al siguiente DAX:
Column =
RANKX (
FILTER ( 'Table', 'Table'[OppID] = EARLIER ( 'Table'[OppID] ) ),
'Table'[Date],
,
ASC,
DENSE
)
Table 2 =
SUMMARIZE (
'Table',
"ID", DISTINCT ( 'Table'[OppID] ),
"Stage 1", CALCULATE ( SELECTEDVALUE ( 'Table'[OldValue] ), 'Table'[Column] = 1 ),
"Stage 2", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 1 ),
"Stage 3", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 2 ),
"Stage 4", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 3 ),
"Stage 5", CALCULATE ( SELECTEDVALUE ( 'Table'[NewValue] ), 'Table'[Column] = 4 )
)
Aquí está el resultado de mi prueba.
@jdonovan debe agregar otra columna para el escenario y luego debe ser fácil
Stage =
SWITCH ( Table[Old Value],
"Prospecting", "Stage 1",
"Qualifying", "State 2",
"Estimating", "Stage 3",
"Proposing", "Stage 4",
"Stage 5"
)
y utilizar esta nueva columna en columnas en la matriz visual
Me gustaría❤ elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
No estoy seguro de que funcionaría debido a nuestra falta de restricción. Desafortunadamente, nuestro equipo de Salesforce no ha bloqueado las posiciones iniciales, al menos no hasta hace poco. Así que un vendedor podría entrar en una oportunidad en la etapa de estimación y que técnicamente sería la Etapa 1. Y luego de allí se mueve a Proponer (o donde sea) que sería la Etapa 2 para esa oportunidad.
Extraño, lo sé.
@jdonovan Supongo que entonces usted necesita clasificar el estado y luego basado en el rango, establecer el escenario
leer más sobre la clasificación aquí.
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Hice un breve disparo usando Rank.EQ, pero no RankX. Lo intentaré con RankX y ver si funciona.
Cuando intenté aplanar las etapas usando instrucciones if que hacen referencia a los resultados de Rank.EQ, creó una fila separada en Stage3 (creo que debido a los criterios)... verá cómo va esto.
De cualquier manera, ¡aprecio todas las sugerencias!
Gracias
John
@parry2k así que tengo el rango abajo, pero ahora produciendo las columnas para que se muestren en una fila singular parece ser un problema. Estoy usando una declaración IF para agarrar cada etapa y el rango se basa en la fecha en que la etapa cambió:
Stage1 - if( [StageRank] á 1, [OldValue])
Stage2 - if( [StageRank] á 1, [NewValue])
Stage3 - if( [StageRank] á 2, [OldValue])
Esto da como resultado lo siguiente
OppID | rango | Etapa 1 | Etapa 2 | Etapa 3 |
ABC123 | 1 | Prospección | Calificación | |
ABC123 | 2 | Estimar |
Incluso cuando elimino el campo de clasificación del objeto visual de la tabla, todavía se muestra como el anterior. ¿Alguna idea de cómo conseguir todo en la misma fila? ¿Debo usar algo además de una declaración IF?
¡Gracias!
@jdonovan hmmm, creo que deberías ser un cálculo para etiquetar Etapa 1 o 2 o 3..., es como categoría con la etapa 1, 2, 3 valores en ella basado en su rango
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |