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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Gopal_PV
Helper III
Helper III

How to do conditional Formatting on numbers to percentage

Hi Folks,

i am having coloumn booking days which iam calculating between two dates.  Now i want to conditional formate this days based on percentage. my requirement is now i want to do conditional formate numbers measure but need to percentage.

if Booking id 1 user need to see by his individual percentage wise. Not numbers wise.

 i tried to apply bur not able to achive.

if Booksdays >=20% <50% Red color

if Booksdays >=51% <75% Yellow color

if Booksdays >=76% <80% Green color

if Booksdays >=81% <120% Blue color

 

Booking IDBooking Days Measure
110
220
325
427
630
7100
8200
9600
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Gopal_PV ,

Below is my table:

vxiandatmsft_0-1701054200387.png

The following DAX might work for you:

Column = 'Table'[Booking Days] / SUM('Table'[Booking Days])
Column 2 = 
   SWITCH(
     TRUE(),
      'Table'[Column] <= 0.2 , "green",
     'Table'[Column] > 0.2 && 'Table'[Column] <= 0.35 , "yellow",
     'Table'[Column] > 0.35 , "red"
   )

The final output is shown in the following figure:

vxiandatmsft_1-1701054254798.png

Best Regards,

Xianda Tang

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

3 REPLIES 3
Anonymous
Not applicable

Hi @Gopal_PV ,

Below is my table:

vxiandatmsft_0-1701054200387.png

The following DAX might work for you:

Column = 'Table'[Booking Days] / SUM('Table'[Booking Days])
Column 2 = 
   SWITCH(
     TRUE(),
      'Table'[Column] <= 0.2 , "green",
     'Table'[Column] > 0.2 && 'Table'[Column] <= 0.35 , "yellow",
     'Table'[Column] > 0.35 , "red"
   )

The final output is shown in the following figure:

vxiandatmsft_1-1701054254798.png

Best Regards,

Xianda Tang

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

audreygerred
Super User
Super User

What are you basing the percentage on? Assuming for Booking ID 1, 10 is the numerator - what is the denominator to calculate the percentage you want to conditionally format on?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





 

Hi   

IF <= Average +20%, "Green", 

IF > Average + 20% && <= Average + 35%, "Yellow", 

IF > Average + 35%, "Red"

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors