Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Tooltip in Treemap

Hello all, 

I am facing an issue with tooltips in Power BI and need some guidance.

I have a treemap visual that shows percentages of Current Budget, Total Committed, and GR Done Executed by area. When hovering over a section of the treemap, I want the tooltip to display the specific value for the area as well as the total value for the selected measure.

The tooltip displays the total value correctly when configured, but when I look at it in the treemap the specific area value is shown twice, causing it to overshadow the total value.

How can I adjust my tooltip configuration to properly display both the specific value of the area and the total value without duplication?

Any suggestions or solutions would be greatly appreciated!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hello,

    To address the issue with tooltips in your Power BI treemap visual, you can follow these steps to configure your tooltips to display both the specific value for the area and the total value for the selected measure without duplication:

    1. Modify Tooltip Fields:

      • Ensure you have the correct fields added to the Tooltip well. Add the specific value and the total value fields.
    2. Create a Custom Tooltip:

      • Create a custom tooltip page to display more detailed information. This page can be designed to show specific values and total values as you want.
    3. Set Up Tooltip Page:

      • Go to your report and create a new page.
      • Design this page with the visuals and fields you want to display as tooltips. You can use a card visual for specific values and another for total values.
    4. Format the Tooltip Page:

      • Resize the page to fit the tooltip area by adjusting the page size settings under "Page Information."
      • Set the page view to "Actual size" for a better layout adjustment.
    5. Link the Tooltip Page to the Treemap:

      • Select the treemap visual in your report.
      • In the Visualizations pane, go to the Tooltip section and set the tooltip to "Report page."
      • Choose the custom tooltip page you created from the dropdown menu.
    6. Customize Tooltip Fields:

      • Ensure that the fields in your custom tooltip page are set to display the correct values. Use DAX measures if needed to calculate the specific and total values correctly.

    Here’s a detailed breakdown of the steps:

    Step-by-Step Guide to Setting Up Custom Tooltips

    1. Create a Tooltip Page:

      • In Power BI Desktop, create a new page.
      • Rename it to something like "Tooltip Detail."
    2. Design the Tooltip Page:

      • Go to the "Page Information" settings and enable "Tooltip."
      • Adjust the page size to Tooltip under "Page Size." Set it to a custom size that fits your needs (e.g., 320x240 pixels).
    3. Add Visuals to Tooltip Page:

      • Add a card visual and set it to display the specific value for the area.
      • Add another card visual and set it to display the total value for the selected measure.
      • Ensure these visuals are clear and well-formatted for a small tooltip.
    4. Configure the Treemap Visual:

      • Go back to your main report page and select the treemap visual.
      • In the Visualizations pane, find the Tooltip section.
      • Set the Tooltip type to "Report page" and select your "Tooltip Detail" page.
    5. Adjust Tooltip Fields:

      • Ensure that the fields added to the Tooltip well are correctly configured.
      • You may need to create DAX measures to display the correct specific and total values without duplication. For example:
        DAX
        Specific Value = SUM('YourTable'[SpecificColumn]) Total Value = CALCULATE(SUM('YourTable'[SpecificColumn]), ALL('YourTable'))
    6. Test the Tooltip:

      • Hover over different sections of the treemap visual to see the custom tooltip in action.
      • Adjust the layout and fields of the custom tooltip page as necessary to ensure clarity and readability.

    Example DAX Measures

    To avoid duplication of values, create distinct measures for specific and total values:

     

    DAX
    SpecificValue = SUM('YourTable'[SpecificColumn]) TotalValue = CALCULATE(SUM('YourTable'[SpecificColumn]), ALL('YourTable'))

    These measures ensure that the specific value and the total value are displayed correctly without overlap.

    By creating a custom tooltip page, you have greater control over the layout and information presented in the tooltip, ensuring both the specific value and the total value are displayed as needed.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,

    Thanks for the solution Anonymous  provided, and i want to offer some more information for user to refer to.

    hello Anonymous ,based on your description, you can consider to creaet a report tooltip that you can custom the tooltip, you can refer to the following link about how to create a report tooltip.

    https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-tooltips?tabs=powerbi-desktop#create-a-report-tooltip-page

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello,

    To address the issue with tooltips in your Power BI treemap visual, you can follow these steps to configure your tooltips to display both the specific value for the area and the total value for the selected measure without duplication:

    1. Modify Tooltip Fields:

      • Ensure you have the correct fields added to the Tooltip well. Add the specific value and the total value fields.
    2. Create a Custom Tooltip:

      • Create a custom tooltip page to display more detailed information. This page can be designed to show specific values and total values as you want.
    3. Set Up Tooltip Page:

      • Go to your report and create a new page.
      • Design this page with the visuals and fields you want to display as tooltips. You can use a card visual for specific values and another for total values.
    4. Format the Tooltip Page:

      • Resize the page to fit the tooltip area by adjusting the page size settings under "Page Information."
      • Set the page view to "Actual size" for a better layout adjustment.
    5. Link the Tooltip Page to the Treemap:

      • Select the treemap visual in your report.
      • In the Visualizations pane, go to the Tooltip section and set the tooltip to "Report page."
      • Choose the custom tooltip page you created from the dropdown menu.
    6. Customize Tooltip Fields:

      • Ensure that the fields in your custom tooltip page are set to display the correct values. Use DAX measures if needed to calculate the specific and total values correctly.

    Here’s a detailed breakdown of the steps:

    Step-by-Step Guide to Setting Up Custom Tooltips

    1. Create a Tooltip Page:

      • In Power BI Desktop, create a new page.
      • Rename it to something like "Tooltip Detail."
    2. Design the Tooltip Page:

      • Go to the "Page Information" settings and enable "Tooltip."
      • Adjust the page size to Tooltip under "Page Size." Set it to a custom size that fits your needs (e.g., 320x240 pixels).
    3. Add Visuals to Tooltip Page:

      • Add a card visual and set it to display the specific value for the area.
      • Add another card visual and set it to display the total value for the selected measure.
      • Ensure these visuals are clear and well-formatted for a small tooltip.
    4. Configure the Treemap Visual:

      • Go back to your main report page and select the treemap visual.
      • In the Visualizations pane, find the Tooltip section.
      • Set the Tooltip type to "Report page" and select your "Tooltip Detail" page.
    5. Adjust Tooltip Fields:

      • Ensure that the fields added to the Tooltip well are correctly configured.
      • You may need to create DAX measures to display the correct specific and total values without duplication. For example:
        DAX
        Specific Value = SUM('YourTable'[SpecificColumn]) Total Value = CALCULATE(SUM('YourTable'[SpecificColumn]), ALL('YourTable'))
    6. Test the Tooltip:

      • Hover over different sections of the treemap visual to see the custom tooltip in action.
      • Adjust the layout and fields of the custom tooltip page as necessary to ensure clarity and readability.

    Example DAX Measures

    To avoid duplication of values, create distinct measures for specific and total values:

     

    DAX
    SpecificValue = SUM('YourTable'[SpecificColumn]) TotalValue = CALCULATE(SUM('YourTable'[SpecificColumn]), ALL('YourTable'))

    These measures ensure that the specific value and the total value are displayed correctly without overlap.

    By creating a custom tooltip page, you have greater control over the layout and information presented in the tooltip, ensuring both the specific value and the total value are displayed as needed.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Thanks for the solution Anonymous  provided, and i want to offer some more information for user to refer to.

    hello Anonymous ,based on your description, you can consider to creaet a report tooltip that you can custom the tooltip, you can refer to the following link about how to create a report tooltip.

    https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-tooltips?tabs=powerbi-desktop#create-a-report-tooltip-page

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.