Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
SO
Helper III
Helper III

Uso de varios filtros y una medida como origen y destinos para un Sankey Visual

Tengo datos que se ve simplificado se ve algo como esto

PersonIDañoInformePuntuaciónNivel
123201920201M65L2
134201920201M55L1
123201920201M67L2
145201920201M95L4
123202020211M75L3
134202020211M55L1
134202020211M45R
145202020211M78L3

Sankey MockupSankey Mockup

Me gustaría producir un sankey Chart que se parece a arriba.

Lo mejor que puedo hacer es algo como esto:

Screenshot2.png

He probado cada combinación de fuente, destino, etiqueta, etc. sin éxito.

A continuación, intenté crear medidas para poder filtrar el año y usar una medida para el destino y otra para las etiquetas de destino.

#Average 20192020
VAR __BASELINE_VALUE ?
CALCULATE(
AVERAGE('Tabla'[Puntuación]),
'Tabla'[Año]
EN el número "20192020"
)
devolución
__BASELINE_VALUE

Y

#Average 20202021
VAR __BASELINE_VALUE ?
CALCULATE(
AVERAGE('Tabla'[Puntuación]),
'Tabla'[Año]
EN el número "20202021"
)
devolución
__BASELINE_VALUE

Puedo tirar de estas medidas en una tabla y usarlas, pero no se arrastrarán a ninguno de los campos de Sankey.

Obviamente me estoy perdiendo algo. Me gustaría hacer esto en DAX sin ir a tablas de datos.

¿Pensamientos sobre cómo proceder? ¿Curioso?

así que

2 ACCEPTED SOLUTIONS
AllisonKennedy
Super User
Super User

@SO ¿Cuál es el contexto de estos datos? ¿Qué es lo que quieres comunicar?

No entiendo completamente, pero he intentado pivotar los datos para que tenga una columna para el origen y una columna para el destino, simplemente no estoy seguro de qué usar para los valores en estas columnas (Usé Level y establecido para no agregar), pero no todas las personas ID tienen datos para ambos años...

Vea el archivo adjunto debajo de la firma.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

Thanks very much Allison. 

Each person has 6 scores for each reporting period and there are 6 reporting periods a year and there are 100K entrys per report.  Pivoting the table is not an option for me so I was trying to find a way to use a measure to sort this out.  We also use AnalysisServices. 

You asked a great question, what am I trying to show?  I'm trying to find people that have moved from one level to another over time.  It appears that most remain at the same level, but some move up, and others down.  I'd really like to have the pattern continue over several reports or years, but one step at a time. :-).

 

Thanks for attempt and much appreciated.   I was able to generate my 'ideal' image by creating a small data set and doing what you did.  Very intensive to do for each reporting period.  Any more thoughts or ideas?  I've watched many videos and read many forums and tried many measure codes, but I cannot get it to work for me.    

View solution in original post

2 REPLIES 2
AllisonKennedy
Super User
Super User

@SO ¿Cuál es el contexto de estos datos? ¿Qué es lo que quieres comunicar?

No entiendo completamente, pero he intentado pivotar los datos para que tenga una columna para el origen y una columna para el destino, simplemente no estoy seguro de qué usar para los valores en estas columnas (Usé Level y establecido para no agregar), pero no todas las personas ID tienen datos para ambos años...

Vea el archivo adjunto debajo de la firma.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Thanks very much Allison. 

Each person has 6 scores for each reporting period and there are 6 reporting periods a year and there are 100K entrys per report.  Pivoting the table is not an option for me so I was trying to find a way to use a measure to sort this out.  We also use AnalysisServices. 

You asked a great question, what am I trying to show?  I'm trying to find people that have moved from one level to another over time.  It appears that most remain at the same level, but some move up, and others down.  I'd really like to have the pattern continue over several reports or years, but one step at a time. :-).

 

Thanks for attempt and much appreciated.   I was able to generate my 'ideal' image by creating a small data set and doing what you did.  Very intensive to do for each reporting period.  Any more thoughts or ideas?  I've watched many videos and read many forums and tried many measure codes, but I cannot get it to work for me.    

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.