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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Error de Power BI Desktop en RankX: A partir de 2 en lugar de 1 al azar

así que. He estado trabajando en esto por más tiempo que me gustaría admitirlo, pero no puedo encontrar una respuesta. Tengo lo que creo que es un simple endevor; para clasificar todas las filas de mis datos por su ROW_ID. Ahora, puesto que todas mis filas ya están enumeradas en orden de 1-n, teórectamente, simplemente debe volver a poner en venta las filas en el mismo orden, como se muestra en el ejemplo siguiente:

Correct-Refresh - Copy.PNG

El problema es que a veces, diría que el 90% de las veces, cuando actualo los datos en su lugar se calcula y se muestra de la siguiente manera:

Wrong-Refresh.PNG

Como se puede ver, está empezando en 2 en lugar de 1, al azar, por aparentemente ninguna razón. Este comportamiento despega otros cálculos que deseo hacer en los datos, y no estoy seguro de por qué está actuando de esta manera.

Aquí está la medida de rango:

Rango: RANKX (ALLSELECTED(TEST_TABLE), CALCULATE(SUM(TEST_TABLE[ROW_ID])), , ASC, Dense)

Soy algo nuevo en Power BI y no estoy seguro de si este comportamiento es un error o si hay algo que me falta. Cualquier visión de lo que está sucediendo sería muy apreciado!

Gracias.

7 REPLIES 7
Anonymous
Not applicable

From more testing the rankx functions only seems to be going wrong when one of the columns, which I will call Description (a column filled with strings) is included in the data. More specifically when the column is included in a visual, it also seems to throw off some visual filters I have on the table.

 

For example, I have a filter that looks to the measure Flag (Flag = IF([Rank]<='TopN'[TopN Value],1,0)), which basically sets it to filter the data by which rows have Flag = 1. This enables the user to change the "What if Parameter" TopN, thus filtering the table by their TopN value. When the Description column is included, the visual correctly shows that in rows where Rank < TopN Value, Flag is 1, but is also shows all of the rows where Flag is 0

 

So where it should show this (Where top N is 2):

Rank---ROW_ID---LASTUPDATE---FLAG---DESCRIPTION

1               1           6/19/2020           1          "random string text"

2               2           6/19/2020           1          "random string text2"

 

It is instead showing:

Rank---ROW_ID---LASTUPDATE---FLAG---DESCRIPTION

1               1           6/19/2020           1          "random string text"

2               2           6/19/2020           1          "random string text2"

3               3           6/19/2020           0          "random string text3"

4               4           6/19/2020           0          "random string text4"

etc...

 

I am still not sure what is causign these issues, as again when Description is included, sometimes it will show correctly, but more often then not it wont.

v-juanli-msft
Community Support
Community Support

Hola @rbenson

Si alguna de las respuestas abula a su problema, no dude en aceptarlo como una solución.

Si no es así, proporcione los detalles a continuación:

¿Tiene celdas en blanco en la tabla o en datos originales?

¿Podría compartir un poco de datos para que pueda reproducir este problema?

Mejores Regrads

Maggie

Anonymous
Not applicable

No hay celdas en blanco en la tabla ni en los datos originales. Desgraciadamente, debido a la naturaleza sensible de los datos no puedo compartirlos. Puedo tratar de describir algunas de las columnas de la tabla.

LASTUPDATE: Campo de fecha y hora.

Tipo: 6 valores diferentes (A, B, C, D, E, F)

Texto: Diferentes líneas de texto "Se leen manzanas", "Las uvas son púrpuras", etc.

Fecha1: Campo fecha/hora

Fecha 2: Campo fecha/hora

Lo único que me a destacar es que en LASTUPDATE y las columnas Type hay muchos valores similares. ¿Quizás eso tiene algo que ver?

parry2k
Super User
Super User

@rbenson si lo ordenas por rango ves que hay rango 1 asignado a una fila diferente, tal vez no estamos viendo la imagen completa aquí

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



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.

Anonymous
Not applicable

Cuando intento ordenar el lsit por rango no puedo encontrar 1 en ningún momento de la lista.

Anonymous
Not applicable

Hola @rbenson, En lugar de ALLSELECTED(TEST_TABLE) dentro de RANKX, intente utilizar ALLSELECTED(TEST_Table[ROW_ID])

Anonymous
Not applicable

Cuando intento la medida de clasificación que sugieres que no solo empieza en 2 en lugar de 1, sino que los datos también están muy mal ordenados.

Por alguna razón no puedo publicar fotos como las anteriores, pero aquí hay una muestra de lo que estoy viendo (tenga en cuenta que esto es en parte abajo en la lista):

36---6/10/2020 12:01:04 AM ---107766---0

37---6/10/2020 12:01:04 AM ---107767---0

2---6/10/2020 12:01:04 AM ---107696---0

3---6/10/2020 12:01:04 AM ---107697---0

4---6/10/2020 12:01:04 AM ---107698---0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors