Forum Discussion

bobbob123's avatar
bobbob123
Icon for Helper III rankHelper III
3 years ago

display tooltip based on different filters

Hi,

 

I have a column chart and a custom tooltip embeded. 

 

I have 2 filters, years and departments. 

 

I want modify my column chart tooltip so that, if only the year is selected (no departments) then it shows a particular tooltip. If I select a year and department then it shows another tooltip. 

 

In esscence, I want the tooltip to adjust based on my filters. Is it possible?

 

I don't know how to upload my powerbi file, but here is a screen shot.

 

 

 

 

6 Replies

  • You can create a measure like below :

     

    IF(ISFILTERED(yourTable[Department] ,
    Measure1,
    ISFILTERED(yourTable[Year]) ,
    Measure2,
    IF(ISFILTERED(yourTable[Department] && ISFILTERED(yourTable[Year]),
    Measure3)))

     

    Measure1,2,3 are the values you want to display in the tooltip based on the selection

    • bobbob123's avatar
      bobbob123
      Icon for Helper III rankHelper III

      Hi Amira,

       

      Thanks for your advice, but I can't seem to make it work. Also the "ISFILTERED()" command only accepts one argument. I have attached my fields column for reference.

       

       

       

      To clarify, i have a custom tool tip which i have created and linked. However, I want that custom tooltip to behave in a way such as when the year is only selected, it will display the results for the departments. If a year and department is selected, then it will display the results for the courses.

       

      I hope this makes sense.