Forum Discussion
Background Color in Matrix rows
- Anonymous1 year ago
Hi Prakash1050 ,
If you want to automatically determine if a month is legal, you can create two columns on the tableIsNotBlank = IF( 'Table 2'[Value] <> BLANK(), 1, 0 )IsTrue = CALCULATE( SUM('Table 2'[IsNotBlank]), ALLEXCEPT( 'Table 2', 'Table 2'[Month_Year] ) )Create a column on the calendar table
IsExist = VAR CurrentMonthYear = 'Calendar'[Calendar] VAR _isTrue = IF ( ISBLANK ( LOOKUPVALUE ( 'Table 2'[IsTrue], 'Table 2'[Month_Year], CurrentMonthYear ) ), 0, LOOKUPVALUE ( 'Table 2'[IsTrue], 'Table 2'[Month_Year], CurrentMonthYear ) ) RETURN IF( _isTrue > 0, 1, 0 )Putting isExist into the visualization filter
Set is 1 and final output
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Adjust the Highlight Measure: Update the measure to ensure it applies formatting even when there’s no value in Overall_Measure.
Here’s how you can modify your Highlight measure:
Create a Formatting Measure for the Background: Create a new measure to apply the conditional formatting based on the Highlight measure.
DAX
BackgroundColor = IF([Highlight] = 1, "#F0AF87", "White")Apply Conditional Formatting in the Matrix Visual:
- Go to your matrix visual in Power BI.
- Select the Overall_Measure field within the Values section.
- Click on Conditional formatting > Background color.
- Choose Field Value as the format style.
- In the drop-down menu, select the BackgroundColor measure.
This setup will apply the background color #F0AF87 to the entire row where Details is "XXX" or "YYY," regardless of whether Overall_Measure has values.
- Prakash10501 year agoHelper III
No, this measure also don't change the background color. The blank values background still in white color.