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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Konrad909090
Helper II
Helper II

Imitate gantt chart using Matrix visual.

Hello experts,
I am trying to build a solution to imitate a gantt chart using matrix visualisation.
The gantt is to display the duration of the project and the colour depending on what stage the project is in.

The problem is that I don't know how to display the right colour when a team name is not developed to see the projects that this team has.
What I want to achieve is e.g. one colour for all the teams when using the plus sign to not expand the rest of the rows.
At the moment, when I use the + to expand the rest of the rows, the team for which I do not expand shows only 1. I would like to replace this with one colour.
It seems to me that the problem lies in the part that is responsible for the colouring of the font and background in the visualisation, which I use in the section ‘Call elements’ -> ‘Backgound colour’ and ‘Font colour’.

Attached are screenshots of the model, measures and a link to the dummy report.
I would appreciate your help 🙂


Link to dummy report 

Konrad909090_0-1729681747417.pngKonrad909090_1-1729681886169.png

 

1 ACCEPTED SOLUTION

Hi @Konrad909090 
Modify the conditional formatting for "Values and totals"

Ritaf1983_0-1729843513665.png

+ if you want the colors of the top row stay when expended , switch on the sub-total per team level:

Ritaf1983_1-1729843627313.png

Result :

Ritaf1983_2-1729843647692.pngRitaf1983_3-1729843670555.png

Modified pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

13 REPLIES 13
Ritaf1983
Super User
Super User

Hi @Konrad909090 
if i understood you correctly and you are looking for the option to apply conditional formatting on the row header

Ritaf1983_0-1729748113963.png

then unfortunately we don't have this functionality, the conditional formatting cam be applied only with the "values" section.
There is an idea about the issue, you can vote for it here :
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=81d13d9e-0b12-ee11-a81c-000d3a0ec312

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 ,

thank you for answer.

I would like to hide the values when a row is not expanded, or set one colour for all collapsed rows.
After expansion, I want them to look as they currently do.
Blank

Konrad909090_0-1729749414125.png
Or with color

Konrad909090_1-1729749473699.pngKonrad909090_2-1729749585663.png

 

Best regards 
Konrad

Hi @Konrad909090 
You can manipulate the values that are shown according to the hierarchy level using the function is in scope.
You didn't attach data to work with , so I will show how it works with my example :

This is my matrix 
Country << category on rows.
Year<< month on columns.
Total sales on values 

Ritaf1983_0-1729751672491.png

To keep a country level blank I can create a measure :

Blanks_ = if(ISINSCOPE('Products'[Category]),[total_sales],"")
The formula says that if I am not on the category level show total sales and on the country level keep it blank.
The result :
Ritaf1983_1-1729751847797.pngRitaf1983_2-1729751865837.png

 

the pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

HI @Ritaf1983 ,

Thanks again for the reply and the solution provided.
I used the ISINSCOPE function. Unfortunately in my case all the values disappear.
I think I am following the logic given in your pbix file but I am still not able to achieve what I want.
I have attached a link to the file in the first post. I can't upload the file directly in the message, I get a message that these types of files are not supported on this form even though you uploaded yours.
So I am providing a link to google drive with my file again.
If you have the time and inclination, I would appreciate it if you would take a look at it.

https://drive.google.com/file/d/1YT8YZAa2KyeFfH0njMCwEvxEHc-If-SY/view?usp=drive_link

Unfortunately, there is no access to the file ...you need to share it with the option "everybody who has a link"

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Sorry, typical mistake. The link should now work. I have also accepted your request.

https://drive.google.com/file/d/1YT8YZAa2KyeFfH0njMCwEvxEHc-If-SY/view?usp=sharing

Hi @Konrad909090 
I update your formula to 

Gantt Value =
VAR ProjectStart = MIN('Projects'[Start date])
VAR ProjectEnd = MAX('Projects'[End date])
var result=
    IF (
        AND
            (
                MAX('Calendar'[Date]) >= ProjectStart,
                MIN('Calendar'[Date]) <= ProjectEnd
            ),
            1,
            BLANK()
    )
    RETURN
    if(ISINSCOPE(Projects[Project name]),result,"")
And it seems that there is a result as you wanted :
Ritaf1983_0-1729755043595.pngRitaf1983_1-1729755059785.png

The updated pbix is attached

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you for your help.
It's strange in your version of the report I can't see the colours when the teams are rolled up.

Additionally the colour shows for all years on your screenshot.

In addition, the team ‘Yellow’ shows but I can eliminate it after by applying a filter.

However, this is more or less what I want to achieve. I just don't know where the problem now lies with the display of colours when the teams are collapsed.



Konrad909090_1-1729757823385.png

 

 

Hi @Konrad909090 
Is this a wanted result?

Ritaf1983_0-1729793429836.pngRitaf1983_1-1729793444134.png

If yes, than all manipulations with isinscope are a part of conditional formatting.
For a background :

Colors =

IF( [Gantt Value] <> 0 && ISINSCOPE(Projects[Project name]),
SWITCH(
    MAX('Projects'[Stage number]),
    4,"#3982A7",
    3,"#B832AC",
    2,"#881176",
    1,"#BA545B",
    0,"#DC7455"
),
 IF(isinscope('Team'[Team]),"#ffdbbb"
    )
)
For a font color:
Font color =
if(ISINSCOPE('Projects'[Project name]),"black","#ffdbbb")
The updated pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly




Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983

Thank you very much for your continued attempts.
We've almost got it, but when rolled out, one team shows the colours and the other only shows ‘1’.

Konrad909090_0-1729834498794.png

 

Hi @Konrad909090 
Modify the conditional formatting for "Values and totals"

Ritaf1983_0-1729843513665.png

+ if you want the colors of the top row stay when expended , switch on the sub-total per team level:

Ritaf1983_1-1729843627313.png

Result :

Ritaf1983_2-1729843647692.pngRitaf1983_3-1729843670555.png

Modified pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 

Thank you very much, this is exactly what I wanted to achieve.
You have saved my day today 😄
THANK YOU VERY MUCH AND HAVE A NICE DAY 😄

Regards
Konrad

Happy to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.