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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lawadaa
Helper I
Helper I

create a custom column that returns a value if number is below specific cap value

i'm trying to create a column that checks if the achievement is less than 0.5 , it should round the number to 0.5 otherwise, it should return the number as is. for example , if achievement is 0.2 or 0.3 , the column should return 0.5 and if achievment is 1.2 it will return 1.2.  i tried to create the custom column with below code but it didn't work.

if ([achievement])<0.5 then 0.5 else ([achievement])

 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Looks like your numbers are in text format. You can do this

if Number.From([achievement])<0.5 then 0.5 else Number.From([achievement])

A shorter construction would be following

List.Max({Number.From([achievement]), 0.5})

View solution in original post

1 REPLY 1
Vijay_A_Verma
Super User
Super User

Looks like your numbers are in text format. You can do this

if Number.From([achievement])<0.5 then 0.5 else Number.From([achievement])

A shorter construction would be following

List.Max({Number.From([achievement]), 0.5})

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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