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
jcastr02
Post Prodigy
Post Prodigy

Matrix - Dark Grey color with max number in each row

Trying to set up a cond formatting to the highest number in each row, to be background color of dark greyMatrix - Color Needed.png

1 ACCEPTED SOLUTION

Hi @jcastr02 ,

 

We can try to use the following measure as the field of condition format to meet your requirement(we have modify it from your last post, now it can be selected).

 

Attribute - Color = IF(count('30 Day - Attribute'[Response])=MAXX(summarize(filter(allselected('30 Day - Attribute'),'30 Day - Attribute'[Attribute.1] IN FILTERS('30 Day - Attribute'[Attribute.1])),'30 Day - Attribute'[Response],"Measure Value", COUNT('30 Day - Attribute'[Response])),[Measure Value]),"#808080","#FFFFFF")

 

 3.jpg

4.jpg

 


Best regards,

 

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

View solution in original post

13 REPLIES 13
jcastr02
Post Prodigy
Post Prodigy

Hello I have a Matrix visualization that I need to change the background color of the HIGHEST number in each row to grey.  What DAX formula can I use for this, please see below screen shots.  

Color Background.png

Hi @jcastr02 ,

 

We can use the following measure as color field to meet your requirement:

 

Color = 
IF (
    SUM('Table'[Value])
        = MAXX (
            SUMMARIZE (
                FILTER (
                    ALLSELECTED ( 'Table' ),
                    'Table'[Attribute] IN FILTERS ( 'Table'[Attribute] )
                ),
                'Table'[Response],
                "Measure Value", SUM('Table'[Value]) )
        ,
            [Measure Value]
        ),
    "#808080",
    "#FFFFFF"
)

 

8.jpg9.jpg

 

If it does not meet your requirement, could you please share the formula of measure you used in the value filed of the matrix visual if it does not contain any confidential information?


Best regards,

 

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

When I go to Cond. Formatting, the Measure I created is greyed out.  See below screen shot.  I see that you created another measure for the Values  area.  I currently just have mine set to a count and % of row.      Any ideas @v-lid-msft 

 

 

Background Color.png

Hi @jcastr02 

 

are there measures or columns in the Martix columns?

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener , no there is not - just using % of row total in the values field  - see screen shot below 

Attribute.png

Hi @jcastr02 ,

 

check this out.

PBIX

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener   Seems it's making all values as 1...can you take a look at file

 

https://1drv.ms/u/s!Ava_12t7CNJtkCGALXOtGpymk1pF 

 

https://1drv.ms/u/s!Ava_12t7CNJtkCGALXOtGpymk1pF

 

Hi @jcastr02 ,

 

We can try to use the following measure as the field of condition format to meet your requirement(we have modify it from your last post, now it can be selected).

 

Attribute - Color = IF(count('30 Day - Attribute'[Response])=MAXX(summarize(filter(allselected('30 Day - Attribute'),'30 Day - Attribute'[Attribute.1] IN FILTERS('30 Day - Attribute'[Attribute.1])),'30 Day - Attribute'[Response],"Measure Value", COUNT('30 Day - Attribute'[Response])),[Measure Value]),"#808080","#FFFFFF")

 

 3.jpg

4.jpg

 


Best regards,

 

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

@v-lid-msft thanks so much that worked, do you know what may be causing this to show as a light grey in this empty box?Confidence Q.png

 

Hi @jcastr02 ,

 

We can use the following meausre to solve this issue:

 

Attribute - Color = IF(count('30 Day - Attribute'[Response]) + 0 <>0, IF(count('30 Day - Attribute'[Response])=MAXX(summarize(filter(allselected('30 Day - Attribute'),'30 Day - Attribute'[Attribute.1] IN FILTERS('30 Day - Attribute'[Attribute.1])),'30 Day - Attribute'[Response],"Measure Value", COUNT('30 Day - Attribute'[Response])),[Measure Value]),"#808080","#FFFFFF"),"#FFFFFF")

 

If you have any other questions, please kindly ask here and we will try to resolve it.


Best regards,

 

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

Conditional Formatting in Matrix 

 

Is there a way to do a conditional format for the highest number in each ROW.  Looking to color it a dark grey color.  Thanksmatrix.png

The screenshot is small , not visible.

But create a rank on that group by. And then using constional fomatting color each column in drak green. Using Rank.

 

https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

Or create even a measure on rank like

if ([RANK Meausre] =1, "green","white")

 

This can be used in conditional formatting , Advance control - Field

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Hi @jcastr02 ,

 

check this PBIX

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.