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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Syndicate_Admin
Administrator
Administrator

Specify First Position

Dear, I have a doubt when making some reports that are requesting me, it is required that in all the views that I can generate, the first position I define, that is to say I want to make a top 5, but that in the first position in all the views I figure for example "Envelopes", it does not matter if it is not in the top 5, it always has to be in first position. Attached is the example.

Thank you very much in advance for your prompt response

jminanoc_0-1632663057600.png

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

1 ACCEPTED SOLUTION

Hi @Syndicate_Admin ,

Ranking =
VAR _1 =
    RANKX( ALLSELECTED( Productos[Categoría de Subproducto] ), [Venta] ) + 1
RETURN
    IF(
        SELECTEDVALUE( Productos[Categoría de Subproducto] ) = "Etiquetas",
        1,
        IF( _1 > 5, BLANK(), _1 )
    )

Here is pbix i changed.

View solution in original post

6 REPLIES 6
v-chenwuz-msft
Community Support
Community Support

Hi @Syndicate_Admin 

 

I have made some changes to your Ranking and am not sure if it is the result you want.

All the filters on the visuals have been modified to show items topn by Ranking in [Categoría de Subproducto].

vchenwuzmsft_0-1632964413258.png

 

 

Best Regards

Community Support Team _ chenwu zhu

 

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

Hello muhcas thank you for the answer, but I can not visualize the changes you made in the ranking, since the image I see is very small and I can not enlarge it, please you can send it in text. Thank you

Hi @Syndicate_Admin ,

Ranking =
VAR _1 =
    RANKX( ALLSELECTED( Productos[Categoría de Subproducto] ), [Venta] ) + 1
RETURN
    IF(
        SELECTEDVALUE( Productos[Categoría de Subproducto] ) = "Etiquetas",
        1,
        IF( _1 > 5, BLANK(), _1 )
    )

Here is pbix i changed.

Thank you very much for the answer, it was what I needed, I leave it as a solution.

jdbuchanan71
Super User
Super User

You could modify the ranking code in this article.

https://www.sqlbi.com/articles/filtering-the-top-products-alongside-the-other-products-in-power-bi/

To give ranking 1 on envelopes then the natural raking +1 for all other items.

Dear, thank you for the answer, but I still can't get it the way I want it. Anyway if I have something I will be publishing.

Best regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors