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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Conditionally formatting hierarchy levels with "Personalise this Visual"

Hi All,

 

Wanting to create a matrix with it's values conditionally formatted based on hierarchy level. I also want end users to be able to "Personalise this visual" from the service and change fields in the hierarchy.

 

Currently using ISINSCOPE to format based on hierachy. However, if a user was to change the highest level from Portfolio to Strategic Theme, the conditional formats no longer apply.

 

Trying to determine if there is an alternate way to conditionally format:

VAR L1 = ISINSCOPE(Projects[Portfolio])
VAR L2 = ISINSCOPE(Projects[Program])
VAR L3 = ISINSCOPE(Projects[ProjectName])
RETURN
IF([Gantt Dates]<>0,
SWITCH(
TRUE(),
L3, "#638EB090", L2, "#638EB0", L1, "#1F4C71")
))

 

Gantt Edit.PNG

4 REPLIES 4
amitchandak
Super User
Super User
Anonymous
Not applicable

Thanks,

 

I was trying to determine if there is a way to reference hierarchy level without "hard-coding" the hierarchy field name. I couldn't see how that could be done using ISINSCOPE.

Hi @Anonymous ,

 

Try using functions such as path to get the highest level hierarchy, and then use the isinscope function according to your previous logic.

https://docs.microsoft.com/en-us/dax/pathlength-function-dax 

https://docs.microsoft.com/en-us/dax/path-function-dax 

 

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

Anonymous
Not applicable

It seems you can use PATH, PATHLENGTH and PATHITEM when you have two known columns in a table. How would you utilise these in a matrix visual with unknown row headers?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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