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
Balakrishnan_J
Frequent Visitor

Measure always showing Top 5 value when used in Tooltip but works fine when used as table

Max_Sale_Product =
VAR TopN_Table =
        TOPN(
        SELECTEDVALUE(TopNTable[Value],5),
        Products,
        [Total_Sales]
        )
   
VAR TopN_Product =
    CONCATENATEX(
        TopN_Table,
        Products[Product] & " | " & FORMAT([Total_Sales], "₹ #,#"),
        UNICHAR(10),
        [Total_Sales],
        DESC
    )
RETURN
    IF(
        [Total_Sales] <> BLANK(),
        TopN_Product &
        UNICHAR(10) & "----------" & UNICHAR(10) &
        "Total = " & FORMAT(CALCULATE([Total_Sales], TopN_Table), "₹ #,#")
    )
 
 1.Normal table using slicer
Balakrishnan_J_0-1740329519749.png

2.Tooltip

Balakrishnan_J_1-1740329573427.png

Question:

When the Max_Sale_Product measure is used in table it is working fine when selecting top 1 or top 5 value in slicer but when the same measure in used against tooltip it is always showing top 5 value. Why?
Hi community members need your help?

1 ACCEPTED SOLUTION
Akash_Varuna
Super User
Super User

Hi @Balakrishnan_J  , 

The issue occurs because tooltips in Power BI often ignore slicer context.

  1. Ensure Slicer Context Propagates
    Add the slicer field (TopNTable[Value]) to the tooltip page and ensure it filters the tooltip.

  2. Use IsInScope in the Measure
    VAR TopN_Value = IF(ISINSCOPE(TopNTable[Value]), SELECTEDVALUE(TopNTable[Value], 5), 5)

  3. Separate Tooltip Logic
    Create a tooltip-specific measure with a fixed or parameter-based TopN value.
    If this post helped please do give a kudos and accept this as a solution
    Thanks In Advance

View solution in original post

2 REPLIES 2
Balakrishnan_J
Frequent Visitor

Hi @Akash_Varuna ,
Its working. Thanks for the solution.

Akash_Varuna
Super User
Super User

Hi @Balakrishnan_J  , 

The issue occurs because tooltips in Power BI often ignore slicer context.

  1. Ensure Slicer Context Propagates
    Add the slicer field (TopNTable[Value]) to the tooltip page and ensure it filters the tooltip.

  2. Use IsInScope in the Measure
    VAR TopN_Value = IF(ISINSCOPE(TopNTable[Value]), SELECTEDVALUE(TopNTable[Value], 5), 5)

  3. Separate Tooltip Logic
    Create a tooltip-specific measure with a fixed or parameter-based TopN value.
    If this post helped please do give a kudos and accept this as a solution
    Thanks In Advance

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.

Top Solution Authors