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
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
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

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 @Anonymous ,

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
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.