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
Tob_P
Helper V
Helper V

Show top ranking Product for that month in Tooltip in Line & Clustered Column Chart

Hi there,

 

I have a Line & Clustered Column Chart that details Sales by Month for each Financial Year. I'm able to use my Rank X Measure to show the top Sales Amount for each month rated by the Product Name which sold the most in that month..

 

Tob_P_0-1666009227044.png

However I would like the Name to be output also. Not sure how to do that! Here's my RANKX dax for the Top Ranked Product Amount Measure..

 

Top Ranked Product Amount =
VAR
RankingContext = VALUES(Nav_Item[Product Name])
RETURN
CALCULATE([Amount Measure],
TOPN( 1, ALL(Nav_Item[Product Name] ), [Amount Measure] ),
RankingContext )
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Top Ranked Product Name =
VAR RankingContext =
    VALUES ( Nav_Item[Product Name] )
RETURN
    CONCATENATEX (
        TOPN ( 1, RankingContext, [Amount Measure] ),
        Nav_Item[Product Name],
        ", "
    )

In the case where there are more than 1 product ranked #1 then it will return a comma separated list of each of them

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Try

Top Ranked Product Name =
VAR RankingContext =
    VALUES ( Nav_Item[Product Name] )
RETURN
    CONCATENATEX (
        TOPN ( 1, RankingContext, [Amount Measure] ),
        Nav_Item[Product Name],
        ", "
    )

In the case where there are more than 1 product ranked #1 then it will return a comma separated list of each of them

@johnt75- Excellent work again John. Worked a treat!

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.