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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.