cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Resolver I

## Conditional formatting on Age >17.75

In an Excel spreadsheet, columns exist for
Date of birth
Age
Column Age stores the persons age and contains a formula with Conditional Formatting
If Age value >17.75 highlight in colour Red.

In powerbi, the data source is the spreadsheet.
Date of birth column is formatted as Date Short
Age column is formatted as Decimal number, 2 decimal places.

The report has a table that displays columns Date of birth and Age.

I select the Age field to apply Conditional formatting on Background.
If create a Rule, it only displays value between AND value
eg if value >= 'value' AND <'value'

I have selected the different drop downs options however it does not allow the rule based on 1 value. It always 'forces' 2 values between and I cannot get further.

If the field is Text format. The Rules display only 1 value to test.
However if the field is a number format, The rules display 2 values range that must be entered.

All I want is a simple condition if  Age value >17.75 highlight in colour Red.

How can this be done.

1 ACCEPTED SOLUTION
Resolver I

Thank you @v-yaningy-msft

Now resolved, I used the following condition to get it working ..

If value => 17.5 number and <=100 number then Red

The condition is,

if Age is greater than or equal to 17.5 and less than or equal to 100 (years age), then Red.

3 REPLIES 3
Community Support

Hi, @dd88

You can refer to @HarishKM reply. IF it does not work, you can try following method.

Method 1 :

Change the portion of the box to 100 Percent.

Method 2:
Use Measure

Measure:

``Age2Color = IF(SELECTEDVALUE('Table'[Age2])>=17.75,"Red")``

Effect:

Best Regards,
Yang
Community Support Team

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Resolver I

Thank you @v-yaningy-msft

Now resolved, I used the following condition to get it working ..

If value => 17.5 number and <=100 number then Red

The condition is,

if Age is greater than or equal to 17.5 and less than or equal to 100 (years age), then Red.

Impactful Individual

@dd88 Hello
You need to use Varriance of age to get the conditional formating.

Thanks
Harish Mishra

If I solve this issue Kindly give kudos and accept this solution.

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors