Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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%.
Solved! Go to Solution.
Hi @cgcw12 ,
I created some data:
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.
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.
5. Enter the Backgroud color interface, set Format by-Field Value, set Based on field-[Conditional Formatting].
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
Hi @cgcw12 ,
I created some data:
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.
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.
5. Enter the Backgroud color interface, set Format by-Field Value, set Based on field-[Conditional Formatting].
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 33 | |
| 32 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 64 | |
| 44 | |
| 30 | |
| 28 |