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
Alexo3627
Frequent Visitor

Top n con elemento adicional

Hola, tengo la tabla 1 con los países con sus ventas y participación; lo que quiero ver es un top 5 de los mismos países pero que siempre incluya a Panamá adicional a los top5, y que la participación no cambie del total general que tiene en Tabla 1.

top 5.PNG

 

Muchas gracias por su apoyo

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Alexo3627 ,

 

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _rank=
RANKX(
    ALL('Table'),[Msh],,DESC)
    return
    IF(
        _rank <=5,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1680591003689.png

3. Result:

vyangliumsft_1-1680591003691.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@Alexo3627 , example gow can you get two column TOPN

 

2 column top N = CALCULATE([Net], TOPN(10, SUMMARIZE(ALLSELECTED('Item'), 'Item'[Brand], 'Item'[Category]), [Net],DESC),VALUES('Item'[Brand]), VALUES('Item'[Category]) )


2 column top N = Sumx(Keepfilters( TOPN(10, SUMMARIZE(ALLSELECTED('Item'), 'Item'[Product Category], 'Item'[Product Name]), [Total_sales],DESC)), [Total_sales])

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.