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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
cgcw12
New Member

Conditional Formatting based on Row Values

Hi

I have a need to highlight %RT Total Days if the % value is greater than 50%. However i can only seem to acheive this based on the column using conditional formatting rather than the row. 

 

Is there a way i can achieve conditional formatting by row values. For example for each row has the % of total days each group has spent and i want to highlight where the % is greater than or equal to 50% and where it is less than 50%.

 

 

cgcw12_1-1625653775616.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @cgcw12 ,

I created some data:

vyangliumsft_0-1625810250434.png

Here are the steps you can follow:

1. Create measure.

date_measure =
SUM('Table'[amount])
group_measure =
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])))

2. Set [date_measure] – Show value as – Percent of row total.

vyangliumsft_1-1625810250438.png

3. When creating a measure, use Conditional Formatting to display it, the value less than 50% is red, and the value greater than or equal to 50% is yellow.

Conditional Formatting =
var group_ = [group_measure]
var current_ = SUM('Table'[amount])
var value_ = DIVIDE(current_,group_)
return
IF(value_<0.5,"red","yellow")

4. Set [date measure] – Conditional Formatting – Background color.

vyangliumsft_2-1625810250440.png

5. Enter the Backgroud color interface, set Format by-Field Value, set Based on field-[Conditional Formatting].

vyangliumsft_3-1625810250441.png

 

  1. Result.

vyangliumsft_4-1625810250446.png

 

Best Regards,

Liu Yang

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

1 REPLY 1
Anonymous
Not applicable

Hi  @cgcw12 ,

I created some data:

vyangliumsft_0-1625810250434.png

Here are the steps you can follow:

1. Create measure.

date_measure =
SUM('Table'[amount])
group_measure =
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[date]=MAX('Table'[date])))

2. Set [date_measure] – Show value as – Percent of row total.

vyangliumsft_1-1625810250438.png

3. When creating a measure, use Conditional Formatting to display it, the value less than 50% is red, and the value greater than or equal to 50% is yellow.

Conditional Formatting =
var group_ = [group_measure]
var current_ = SUM('Table'[amount])
var value_ = DIVIDE(current_,group_)
return
IF(value_<0.5,"red","yellow")

4. Set [date measure] – Conditional Formatting – Background color.

vyangliumsft_2-1625810250440.png

5. Enter the Backgroud color interface, set Format by-Field Value, set Based on field-[Conditional Formatting].

vyangliumsft_3-1625810250441.png

 

  1. Result.

vyangliumsft_4-1625810250446.png

 

Best Regards,

Liu Yang

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

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.