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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Uzi2019
Super User
Super User

Rango top 10 ciudad y el descanso deben mostrarse como otros

Hola expertos,

Quiero mostrar sólo el top 10 ciudad y el resto de la ciudad debe ser exhibido como "otros". Quiero mostrar en el gráfico circular donde sólo 11 valores deben mostrar los 10 mejores valores de la ciudad + otros.

No puedo establecer rango en mi columna de la ciudad. está mostrando el rango 1 a toda la ciudad.

Gracias de antemano.

Capture.PNG

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
14 REPLIES 14
harshnathani
Community Champion
Community Champion

Hola @Uzi2019 ,

Utilice esta medida

Clasificación ?

var a á RANKX(ALL('Table'[Region]), Calculate (Sum('Table'[Impressions]))
devolución
IF (a>10, "Otros", CONVERT(a,STRING)

saludos
Harsh Nathani

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución! Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

@harshnathani ,

Muchas gracias por su respuesta. Funciona según lo esperado, pero no se puede mostrar en el gráfico circular.

Porque Su medida dada no se agrega a la propiedad "Leyenda" del gráfico circular.

Por favor, ayude más, ya que estamos casi cerca.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

@Uzi2019 ,

No creo que se pueden utilizar medidas en Leyenda de un gráfico circular.

Debe crear un Colum calculado en caso de que desee utilizar esto como una leyenda.

saludos

Harsh Nathani

@Uzi2019 ,

Columna de rango ( Rank Column)

var a á RANKX(Table', Calculate (Sum('Table'[Impressions]))
devolución
IF (a>10, "Otros", CONVERT(a,STRING)

saludos

Harsh Nathani


¿He respondido a tu pregunta? ¡Marca mi puesto como una solución! Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

@harshnathani ,

Probé tu columna de rango, pero me da dependencia circular.

Capture.PNG

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

@harshnathani ,

He reemplazado ALL por ALLSELECTED por lo que la dependencia circular se ha eliminado. pero no mostrar los valores "Otros" en la columna calculada.

Capture.PNG

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

HOLA @Uzi2019 ,

Crear una columna calculada

SumValuesCOl ? CALCULATE(SUM('Table'[Values]), FILTER (ALLEXCEPT('Table','Table'[region]), NOt(ISBLANK('Table'[region]))))

Crear otra columna calculada

regionrank ?
VAR a

IF(NOT(ISBLANK('Table'[region])),
RANKX(SUMMARIZE('Table','Table'[SumValuesCOl]),'Table'[SumValuesCOl]))
devolución
IF (a>10, "Otros", CONVERT(a,STRING))
1.jpg
2.JPG

saludos
Harsh Nathani

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución! Apreciar con un Kudos!! (Haga clic en el botón Pulgares arriba)

@harshnathani

Muchas gracias. realmente resolvió mi problema..

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

hola @Uzi2019

Pruebe esta fórmula para crear una columna

regionrank = VAR a= RANKX(Facebook,CALCULATE(SUM([Impressions]),ALLEXCEPT(Facebook,Facebook[Region])),,DESC)
return
IF(a>=11,"Others",Facebook[Region])

O

regionrank = 
VAR a= RANKX(Facebook,CALCULATE(SUM([Impressions]),FILTER(Facebook,Facebook[Region]=EARLIER(Facebook[Region]))),,DESC)
return
IF(a>=11,"Others",Facebook[Region])

Si no es su caso, por favor comparta su archivo pbix de muestra para que tengamos una prueba.

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lili6-msft / @harshnathani

Por favor, encuentre el archivo pbix en el siguiente enlace.

https://drive.google.com/file/d/1nNSktMkDxrgLyyz0fZCnZwJxjOgyPrTw/view?usp=sharing

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

@Uzi2019 ,

Por favor, comparta los datos pbix o sample.

Sube en One Drive o comparte a través de Google Drive.

saludos

Harsh Nathani

parry2k
Super User
Super User

@Uzi2019 para el rango , leer estos mensajes

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

y para el top 10, revisa este post, espero que ayude

https://community.powerbi.com/t5/Desktop/Top-10-Other/td-p/51282

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.

@parry2k

No puedo averiguar cómo obtener el valor 11 como valor "otros" en cloumn con los 10 valores principales..

Obtuve el rango pero no puedo encontrar el siguiente paso para calcular "Otros".

Capture.PNG

Cuando aplico a continuación DAX me da error:

rank2 - IF([rank]<-10,Facebook[Region],"Others")
Cualquier ayuda sería muy apreciada.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

@Uzi2019 ,

Tendrá que convertir el valor de clasificación numérica en Texto.

var a á RANKX(ALL('Table'[Region]), Calculate (Sum('Table'[Impressions]))
devolución
IF (a>10, "Otros", CONVERT(a,STRING)

saludos

Harsh Nathani

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Kudoed Authors