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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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