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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors