Forum Discussion

carinalou's avatar
carinalou
Advocate II
2 years ago
Solved

Exclude tooltip field from chart title, OR create dynamic chart title displaying hierarchy level

I have a bar chart showing Sales by Category, with the option to drill down to Subcategory. I've included another field, Order Count, in the tooltip. When viewing the chart at the Category level, the automatic title is "Sales and Order Count by Category" and when viewing at the Subcategory level, it changes to "Sales and Order Count by Subcategory."

What I WANT to happen is that the title changes between "Sales by Category" and "Sales by Subcategory" depending on the drill down state. It should keep the dynamic behaviour, but exclude the name of the field in the tooltip.

 

I tried writing a measure for the title as below, but it just shows up as blank since I didn't specify an ELSE behavior. I don't think the title falls within the context of the drill down state to determine what's in scope.

 

IF( ISINSCOPE( Table[Subcategory]), "Sales by Subcategory",
IF( ISINSCOPE( Table[Category]), "Sales by Category"
))

 

Is there any other way to achieve this?