cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Matrix Background Color

Hello! How are they?

I'm needing to get to the next color result in a matrix. The color remains static regardless of the result.

Mery98_0-1653790712706.png

To solve it, what I did was create a column in the query and then put the background conditional formatting according to that column. The drawback is that, for cases where there is no combination, and the cell is blank, I do not take the conditional formatting.

Mery98_1-1653790808711.png

How can I fix it?

Thank you!!

5 REPLIES 5
yingyinr
Community Support
Community Support

Hi @Mery98 ,

You can refer the following threads to get it:

Display zero instead of blank in matrix


Hi, you can obtain this view following these steps:

1.Create a new Table (Modeling-New Table)

Tablepr=Distinct(Table1[pr]

 

2. Related both tables

 

3. Create the Measure to Count IDs

CountIDs=Count(Table[id]) + 0

unable to replace blank with zeros in matrix

As @Fowmy points out, if there are no rows in the data table corresponding to a particular cell, then it can't return anything since there's nothing to evaluate. It doesn't matter if you add "+0" to the measure since it never gets called in the first place.

 

The solution to this is to use dimension tables to populate the rows and columns in the visual. I.e., a date table for the rows and some sort of index table for the columns. This way, the measure you put in the matrix cells lives in the cross-join of the dimensions rather than being limited to the subset that intersects with your data table.


If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you! With that I filled in what was missing but does not paint me in green the cases in 0, how could I do in this case?

Mery98_0-1654474180353.png

Hi @Mery98 ,

In order to give you a suitable solution, could you please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Syndicate_Admin
Administrator
Administrator

Thank you! I tried this option but it still doesn't work

Mery98_0-1653865284482.png

Fowmy
Super User
Super User

@Syndicate_Admin 

In the measure that is used within your matrix, add +0 at the end then adjust your CF logic to suit the results



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors