Forum Discussion

Hennry2344's avatar
Hennry2344
Regular Visitor
5 years ago
Solved

highlight and tooltip

When I cross-filter my sales bar chart by country, I want to display the highlight of my bar chart by manufacturer but in percentage, normally Power Bi displays it in absolute values.

Hennry2344_0-1602133527723.png

Hennry2344_1-1602133548250.png

I created a measure and it works well when I put it on a table, but when I put it in the tooltip, it shows me 100%

Hennry2344_2-1602133558478.png


Is there another way to achieve this result?
Thank you

  • Hi , Hennry2344 

    I didn't find any error in your formula.

    I guess that  hightlight will not affect the  measure filed in tooltip.

     

    As a workaroud,you can try to create a custom tooltip by using "text box" and the  "Card" visual.
    And you need to modify the page backgroud color,tooltip page size,visual font size....

    The result will show as below:

    Please check the attached pbix file for more details.
    pbix attached

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

4 Replies

    • Hennry2344's avatar
      Hennry2344
      Regular Visitor
      % Selected =
      VAR TotalRevenue = CALCULATE(SUM(Sales[Revenue]),ALL(Sales), VALUES(Manufacturer[Manufacturer]))
      VAR highlighted = CALCULATE(SUM(Sales[Revenue]), ALLSELECTED(Sales[Country]))
      return
      DIVIDE(highlighted,TotalRevenue )
      • v-easonf-msft's avatar
        v-easonf-msft
        Icon for Community Support rankCommunity Support

        Hi , Hennry2344 

        I didn't find any error in your formula.

        I guess that  hightlight will not affect the  measure filed in tooltip.

         

        As a workaroud,you can try to create a custom tooltip by using "text box" and the  "Card" visual.
        And you need to modify the page backgroud color,tooltip page size,visual font size....

        The result will show as below:

        Please check the attached pbix file for more details.
        pbix attached

         

        Best Regards,
        Community Support Team _ Eason
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.