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
Andrew-HLP
Helper I
Helper I

Tooltips (beginners question)

Hello 

 

I have built a report (matrix) which looks like this...

 

AndrewHLP_0-1742666995074.png

 

I can use the [+] buttons on each row to drill though the accounts hiarchy to show different levels of detail - Level 1 (summary) to   Level 4 (detail).  In the screenshot below the tree has been expanded to show level 2 detail.

 

AndrewHLP_1-1742667220248.png

 

I would like to make my Tooltip window dynamic so that it shows the next level of detail to what is displayed.

It is easy to fix it so it always displays level x data for the cell I am hovering over but not the next level down (screenshot below is fixed to show level 2).

 

AndrewHLP_2-1742667516040.png

 

I can ascertain what level the main report is expanded by checking if the following expression  is true: 

 

isinscope('GL Map Accounts'[Level x])
 

How can I use this to vary the contents of the Tooltip?

 

Thanks in advance for your help.

 

Regards

Andrew

 

P,S.  Reports contain spurious test data not real data.

 

 

1 ACCEPTED SOLUTION

Hi @Andrew-HLP ,

 

Thank you for reaching out to Microsoft Fabric Community Forum.

@DataNinja777 Thank you for your response.

 

@Andrew-HLP You're on the right track using ISINSCOPE() to detect the current level in the matrix. Since your goal is to show the next level down in a dynamic Tooltip based on what's currently expanded in the matrix, here's an approach that works well in practice:

Instead of trying to dynamically change the field parameter (which Power BI doesn't currently support conditionally), you can use multiple visuals on your Tooltip page,one for each level of detail and control their visibility using DAX.

For example, you could create measures like:

ShowLevel3InTooltip =
IF(
    ISINSCOPE('GL Map Accounts'[Level 2]) && NOT ISINSCOPE('GL Map Accounts'[Level 3]),
    1,
    0
)

This measure checks if you're currently viewing Level 2 and hides the visual unless you're hovering at that level.

Then on your Tooltip page:

  • Add a visual for each level you want to show (e.g., Level 3, Level 4).
  • Use a visual-level filter on each one like ShowLevel3InTooltip = 1 to ensure only the correct level is visible based on the matrix drill level.

This gives users a clean experience where the Tooltip always shows the next level of detail, depending on how far they've expanded in the matrix.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

Regards,

B Manikanteswara Reddy

View solution in original post

6 REPLIES 6
DataNinja777
Super User
Super User

Hi @Andrew-HLP ,

 

It often makes more sense to use a mapping table rather than hardcoding the logic directly in DAX. This keeps your model cleaner, more scalable, and easier to maintain, especially if the hierarchy changes or grows.

Instead of using a SWITCH statement like this:

VAR CurrentLevel =
    SWITCH(
        TRUE(),
        ISINSCOPE('GL Map Accounts'[Level 4]), 4,
        ISINSCOPE('GL Map Accounts'[Level 3]), 3,
        ISINSCOPE('GL Map Accounts'[Level 2]), 2,
        ISINSCOPE('GL Map Accounts'[Level 1]), 1,
        0
    )

You could create a simple mapping table like this:

LevelName LevelOrder NextLevel
Level 1 1 2
Level 2 2 3
Level 3 3 4
Level 4 4 5

 

Then, in your 'GL Map Accounts' table, include a LevelOrder column and set up a relationship or use a lookup to bring in the corresponding NextLevel.

Your measure would become:

ShowOnlyNextLevel =
VAR CurrentLevelOrder =
    MAX('GL Map Accounts'[LevelOrder])
VAR NextLevelOrder =
    CALCULATE(
        MAX('Level Mapping'[NextLevel]),
        FILTER(
            'Level Mapping',
            'Level Mapping'[LevelOrder] = CurrentLevelOrder
        )
    )
RETURN
    MAX('GL Map Accounts'[LevelOrder]) = NextLevelOrder

This way, you’re decoupling logic from DAX and putting structure in your data model, which is always a good idea when dealing with complex or potentially changing hierarchies.

 

Best regards,

 

Hello, thanks for the reply.  You are right, I am currently using SWITCH and ISINSCOPE() to return the current level / next level (current level + 1).   Switching to a table might be neater, but it doesnt solve my problem.

 

My mapping table ('GL Map Accounts') table looks like this:

AndrewHLP_3-1742805306580.png

 

NB: I realise I could make this more efficient by holding the mapping for each pair of levels (e.g. Level 1 and Level 2, Level 2 and Level 3, Level 3 to Level 4) in seperate tables but users find a flat structure easier to work with.

 

I want rows in the Tooltip window to dynamically change to show the next level down when I hover over a cell.  Its easy enough to fix the level or even dynamically change it using the parameter and slicer

 

Code for Parameter (doesn't allow conditional statements within it)

 

AndrewHLP_2-1742805141130.png

 

Parameter Level =
{
    ("L1", NAMEOF('GL Map Accounts'[Level 1]), 0),
    ("L2", NAMEOF('GL Map Accounts'[Level 2]), 1),
    ("L3", NAMEOF('GL Map Accounts'[Level 3]), 2),
    ("L4", NAMEOF('GL Map Accounts'[Level 4]), 3)
}
 
Slicer
 AndrewHLP_0-1742804692876.png
 Config of Tooltip
 
AndrewHLP_1-1742804997416.png

 

Does anyone have any ideas?
 
Thanks in advance.

 

Andrew

Hi @Andrew-HLP ,

 

Thank you for reaching out to Microsoft Fabric Community Forum.

@DataNinja777 Thank you for your response.

 

@Andrew-HLP You're on the right track using ISINSCOPE() to detect the current level in the matrix. Since your goal is to show the next level down in a dynamic Tooltip based on what's currently expanded in the matrix, here's an approach that works well in practice:

Instead of trying to dynamically change the field parameter (which Power BI doesn't currently support conditionally), you can use multiple visuals on your Tooltip page,one for each level of detail and control their visibility using DAX.

For example, you could create measures like:

ShowLevel3InTooltip =
IF(
    ISINSCOPE('GL Map Accounts'[Level 2]) && NOT ISINSCOPE('GL Map Accounts'[Level 3]),
    1,
    0
)

This measure checks if you're currently viewing Level 2 and hides the visual unless you're hovering at that level.

Then on your Tooltip page:

  • Add a visual for each level you want to show (e.g., Level 3, Level 4).
  • Use a visual-level filter on each one like ShowLevel3InTooltip = 1 to ensure only the correct level is visible based on the matrix drill level.

This gives users a clean experience where the Tooltip always shows the next level of detail, depending on how far they've expanded in the matrix.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

Regards,

B Manikanteswara Reddy

Hi @Andrew-HLP ,

 

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

 

If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

B Manikanteswara Reddy

Hi @Andrew-HLP ,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

B Manikanteswara Reddy

Hi @Andrew-HLP ,

 

May I ask if you have gotten this issue resolved?

 

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Please don't forget to give a "Kudos vbmanikante_1-1747315091263.png" – I’d truly appreciate it!

 

Regards,

B Manikanteswara Reddy

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.