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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

filtros de valor superior en el gráfico de rosquillas

Dataset.JPG

Hola

Requisito: Dos gráficos de donut – Uno para mostrar la mejor ciudad y segundo gráfico para mostrar la mejor segunda ciudad.

Cuando el usuario selecciona "India" en Filtro de país, Primera donut debe mostrar el departamento de Coimbatore, ya que el recuento de Coimbatore es más alto. El segundo gráfico debe mostrar el departamento de Chennai.

Hemos probado con los filtros Top N, No tiene opción para elegir la segunda parte superior.

Cualquier pista sería apreciada.

Gracias por adelantado.

3 REPLIES 3
Anonymous
Not applicable

HI @Asha_Anandan_04,

Puede considerar el uso de la fórmula de medida para comprobar la categoría n superior y usarla en el filtro de nivel visual para filtrar la segunda.

Measure =
VAR summary =
    SUMMARIZE (
        ALLSELECTED ( table ),
        [Country],
        [City],
        "Count", COUNT ( table[Department] )
    )
VAR _top =
    MAXX ( summary, [Count] )
VAR _second =
    MAXX ( FILTER ( summary, [Count] < _top ), [Count] )
VAR _city =
    MAXX ( FILTER ( summary, [Count] = _second ), [City] )
RETURN
    IF ( SELECTEDVALUE ( table[City] ) = _city, "Y", "N" )

saludos
Xiaoxin Sheng

amitchandak
Super User
Super User

@Asha_Anandan_04, Rank debería ayudarte.

Refiérase a si este blog puede ayudar - Un visual sólo tiene top1 otro tienen sólo 2nd topper

https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...

Para el rango Refiera estos links
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-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
harshnathani
Community Champion
Community Champion

@Asha_Anandan_04 ,

Creo que necesitas algo como esto.

123.JPG

Cree una tabla TOPN con el valor 1 a 10 para utilizarla como filtro.

Clasificar la columna

rango: RANKX(DATA,DATA[SALES],,DESC)
y luego hacer un deslizador X superior
_Top X ?
CALCULATE(SUM(DATA[SALES]),FILTER(DATA,DATA[rank]>-MIN('TOPN'[TOP N])&&DATA[rank]<-MAX('TOPN'[TOP N])))
Avísame si esto funciona.
saludos
Harsh Nathani

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.