Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Please find the below, while converting the Decimal to whole number - sometimes round up is working and sometimes round down .
Example- For 62.5 and 61.5 showing same value.
If 0.5 come then it needs to Round up like highlighted in red color.
Result , i need like below in Query editor itself.
Thanks,
@amitchandak@Greg_Deckler
How are you converting it?
It seems that if you just set the data type to "Int64.Type" the system will round to the nearest even number (so-called banker's rounding although I don't think it was used by bankers).
That rounding method actually decreases the variance compared with always round 0.5 up.
If you want to change the rounding method from the default, you can accomplish the conversion using `Int64.From` and specify your desired rounding method.
For example:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtAzVYrViVYyhNImUNrMCMaAyZgZ65koxcYCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Test = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Test", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Result", each Int64.From([Test],"en-US",RoundingMode.AwayFromZero), Int64.Type)
in
#"Added Custom"
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
9 | |
8 | |
7 |
User | Count |
---|---|
17 | |
10 | |
7 | |
6 | |
6 |