Forum Discussion
convert numeric numeric number to whole number
I have column of numbers of years in decimal form
.142
2.208
1.13875
4.03
3.96
How do I create column of numbers to get
<1 yr.
02 yr.
01 yr.
04 yr.
03 yr.
Hi bdehning ,
Please create the new column.
Column = VAR _trunc = TRUNC ( 'Table'[Number] ) RETURN IF ( _trunc < 1, "<1", FORMAT ( _trunc, "00" ) ) & " yr"If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- bdehning
Post Prodigy
I should have mentioned the decimal numbers could go as high as 60. There are not just 5 rows of data.
- v-kkf-msft
Community Support
Hi bdehning ,
Please create the new column.
Column = VAR _trunc = TRUNC ( 'Table'[Number] ) RETURN IF ( _trunc < 1, "<1", FORMAT ( _trunc, "00" ) ) & " yr"If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.