Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Carmichael01
Helper I
Helper I

Dynamic Chart Title based on Level of Hierarchy being displayed

I would like to esentailly 're-create' the way a chart title changes when you move up and down a hierarchy as per the following;

https://dataandai.files.wordpress.com/2019/05/drill-up-and-down-title-change.gif?w=533&zoom=2

 

However, the automiatically generated title is too on so I want to shoten it bu keep the dynamic reference to the level of the hierarchy.  I initally tried ISINSCOPE and HASONEFILTER but these done work as expected - as per here

I want to use in both maps as well as the curtom bullet chart visual.  The main aim is when the user is reading the report they can tell at which level they have drilled up/down.

 

   

11 REPLIES 11
JNordentoft
Frequent Visitor

Hi, I am facing a similar issue. Have you found any good solution for this? 

craigdormire
Frequent Visitor

Would still like to find a solution to this - Chart Title display current hierarchy level.  Works as Tool Tip, not for Chart Title.  Thanks for any tips!!

lbendlin
Super User
Super User

"Don't work as expected" - please elaborate?

Apologies - I have updated the inital post where I hadnt posted the correct link to another thread that describes the same issue.

 

Here is is again:

 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Position-in-drill-down-hierarchy-of-a-visual-...

 

The expected behaviour I am looking to acheive is the same as the native/standard Power BI title which changes to display the level of the hierarchy depending on where the user is (drill up and down).

 

ISINSCOPE only shows the level when it is used certain visuals /visual elelments.  It works in a table as each row context can be applied but it doesnt do the same in measure for the title.

 

HASONEFILTER only works if there is a filter applied which isn the case when using drill up/down in the hierachy.

 

In summary - the best way to reframe the question is  "How do I recreate the native/standard BI title in a measure so that it references the level of the hierarchy being displayed/used in the visual?"

Your statement on ISINSCOPE

 

"ISINSCOPE only shows the level when it is used certain visuals /visual elelments.  It works in a table as each row context can be applied but it doesnt do the same in measure for the title."

 

is not what the doumentation says. https://docs.microsoft.com/en-us/dax/isinscope-function-dax

 

You should be able to use that function for your measure text computation.

 

 

I see your point. The matrix title is wired to Measure 4.  Interestingly enough the filter context for the individual items works correctly. It's the Totals that throw things off. But this should be manageable.

 

Annotation 2020-07-12 205117.png

Thanks for looking at this.

 

I think that your current measure is just pickng up the ELSE statement "Fiscal Month" so if there is NO SCOPE (none on the title) then it just returns that value as there is no context for the title to work with.  I also beleive that the ISINSCOPE order needs to be from lowest level to highest of the hierarchy.

I quickly created the example you used.

ISINSCOPE.png

 

ISINSCOPE = 

VAR _inscope = 
SWITCH(
    TRUE(),
    ISINSCOPE('Date Table'[Fiscal Month]), "Fiscal Month",
    ISINSCOPE('Date Table'[Fiscal Quarter]), "Fiscal Quarter",
    ISINSCOPE('Date Table'[Fiscal Year]), "Fiscal Year",
"No Scope"
)

RETURN

_inscope

 

 

I think this is even more evident when you change this into a visual rather than a table.  The ISINSCOPE works as a tool tip (becuase it has context) but the title will always be No Scope


TBH I am not even sure I was on the right track using ISINSCOPE...

 

 

Anonymous
Not applicable

Having the same issue.

 

ISINSCOPE works if you drill down on a matrix for example or in the tooltip, but if you use a measure to dynamically show the level you are on the visual title, it does not seem to work.

 

joaosantos_0-1598908398767.png

Any idea why?

Just trying to bump this.... anyone got any ideas?

hi, 

 

me too just want to apply this dynamic title based on hierarchy level, is there any new solution for this?

please advice, thanks! 

Also required! Thanks for any intel

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors