Whether you are a new user or an experienced data expert, Microsoft's active analytics communities are designed for you to ask questions, provide solutions, and build your knowledge.
Register NowEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All
I wonder if someone could help me out with a challenge I'm facing. Im calculating pro-rate annual leave and need to round the result up to the nearest 0.5.
My column looks like this
= Table.AddColumn(#"Changed Type2", "Pro-Rata", each ([Allowance]/12)*[Months Elapsed],Int64.Type)
and I was hoping there's something I can do to get e.g. 2.25 to round to 2.5, or 3.17 to round to 3.5 etc.
Thanks for all the suggestions. I ended up going down a route I used in Excel many years ago.
Rounded up 2 x the number and then divided it by 2. Seems to work perfectly. I did expect there to be a CEILING/FLOOR type function but aparently not. No matter, I think the method I've used does the job.
Hope this helps though this may not be the most efficient way:
Thank you, that does work. I wanted to go on and use that rounded number in another custom column but I'm not sure that I can to that having added a column in this way. Is there a way to use Custom Column in Transform Data to acheive same?
you can try this in PQ
= Table.AddColumn(#"Changed Type", "Custom", each Number.RoundUp([Column1]/0.5)*0.5)
Proud to be a Super User!
@Anonymous
you can try this
Column = CEILING('Table'[Column1],0.5)
Proud to be a Super User!
User | Count |
---|---|
106 | |
86 | |
81 | |
72 | |
71 |
User | Count |
---|---|
112 | |
100 | |
98 | |
72 | |
66 |