Forum Discussion
Matrix Grid lines Custom Colors
Hi Power BI Experts,
I have a requirement to display hierarchy level grid line colors in matrix chart. If you see in below screen shot, i want to display mine total line values should be grey color, region total line values should be blue color & grand total line values gold color. Can you please help me, how can we acheive this requirement.
prakash11440278 unfortunately not possible as described earlier.
8 Replies
- parry2kSuper User
prakash11440278 use ISINSCOPE function with conditional formatting for Total and that will do the job. for ISINCOPE look at this post.
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- prakash11440278Post Prodigy
Hi parry2k ,
Thanks for the reply.
This is for custom grid line color change based on hierarchy levels not for text data. Kindly provide the steps how can we acheive the requirement. Thanks.
- amitchandakSuper User
prakash11440278 , one way is to choose style under the style.
or See if you can create one for your need using the theme
https://powerbi.tips/tools/report-theme-generator-v3/
Another option is conditional for that will only work for values and you have to do for all columns.
You can create a color measure and field value option
A color measure like
Switch(
not(isfiltered(Table[Region])) && not(isfiltered(Table[City])) , "Gold",
(isfiltered(Table[Region])) && not(isfiltered(Table[City])) , "grey",
"Blue"
)Refer for steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-valuesFor isinscope, isfiltered
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- amitchandakSuper User
prakash11440278 , I doubt you can change grid line color
- prakash11440278Post Prodigy
Hi amitchandak ,
Yes you are true i want to change only grid line colors. As you see in my screen shot Mine Total Horizontal line should be grey color, Region Total Horizontal line should be blue color & Total Horizontal line color is gold.
If we change the horizontal grid line color it is applying for all horizontal lines, that i dont want. I want only specific horizontal line color changes.
- prakash11440278Post Prodigy
- parry2kSuper User
prakash11440278 I think he means total value not actually grid lines color. Can you confirm? if you are looking for different grid line colors, it is not possible as suggested by amitchandak
- parry2kSuper User
prakash11440278 unfortunately not possible as described earlier.