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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Get the max for a calculated measure based on top 10 products

Hello,

 

I have a measure that ranks my products based on sales 

Product Rank =
VAR Ranking =
    RANKX(
        FILTER(
            ALLSELECTED(Product[Product]),
            NOT(ISBLANK(CALCULATE(SUM(Sales[Quantity]))))
        ),
        CALCULATE(SUM(Sales[Quantity]))
    )
RETURN
    Ranking
 
Another measure that gets the maximum of a calculated measure 
MAXX(Sales, [Declared Stock]) however this measure gets the maximum value of declared in the whole dataset.
 
I would like to get the maximum but only within the top 10 products, how can I achieve that?
 
Thank you!
1 REPLY 1
Mahesh0016
Super User
Super User

@Anonymous i hope this helps you !THANK YOU!!
Plot this measure  MAXX(Sales[Declared Stock])

Mahesh0016_0-1687527207566.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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