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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mklevemann
Frequent Visitor

Rounding issue with DataFlow Gen2

I am loading a fabric data warehouse using Dataflow Gen2 and have run into a weird problem.  Whenever I do any floating point math with a couple of columns of the data I'm uploading, I get a good floating point result in dataflow but when it loads the data warehouse it rounds off the decmial portion of the number.   I am loading it into a decimal(38) field in the database.

 

Here is an example of the transform statement and you can see the new column does have decimal data in it:

 

mklevemann_0-1767211282600.png

 

1 ACCEPTED SOLUTION
deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @mklevemann

 

This usually happens when the destination column (in your Fabric Data Warehouse) is defined with no scale, e.g., DECIMAL(38) which defaults to DECIMAL(38,0). In T‑SQL, if you omit the scale, SQL rounds/truncates the fractional part on insert. Dataflow Gen2 shows the correct floating‑point value in the preview, but when it lands in the warehouse it’s implicitly cast to DECIMAL(38,0), so the decimals are lost.
 
Alter the Warehouse column to include scale
Pick a scale that fits your business rules (common choices: 2 for money, 4 or more for rates, 6–12 for scientific/FX).
 

-- Example: keep up to 10 decimal places
ALTER TABLE dbo.YourTable
ALTER COLUMN YourNumericColumn DECIMAL(38, 10) NOT NULL;  -- or NULL if applicable

 

Hope this helps - please appreciate giving a Kudos or accepting as a Solution! 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

View solution in original post

3 REPLIES 3
deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @mklevemann

 

This usually happens when the destination column (in your Fabric Data Warehouse) is defined with no scale, e.g., DECIMAL(38) which defaults to DECIMAL(38,0). In T‑SQL, if you omit the scale, SQL rounds/truncates the fractional part on insert. Dataflow Gen2 shows the correct floating‑point value in the preview, but when it lands in the warehouse it’s implicitly cast to DECIMAL(38,0), so the decimals are lost.
 
Alter the Warehouse column to include scale
Pick a scale that fits your business rules (common choices: 2 for money, 4 or more for rates, 6–12 for scientific/FX).
 

-- Example: keep up to 10 decimal places
ALTER TABLE dbo.YourTable
ALTER COLUMN YourNumericColumn DECIMAL(38, 10) NOT NULL;  -- or NULL if applicable

 

Hope this helps - please appreciate giving a Kudos or accepting as a Solution! 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

Thanks!   My brain must not have been working properly that day.  Your solution worked perfectly.

v-csrikanth
Community Support
Community Support

Hi @mklevemann 
Thanks for reaching out to the Fabric Community.
This behavior occurs because in Fabric Warehouse:
DECIMAL(38) = DECIMAL(38,0)

When Dataflow Gen2 loads data, decimal scale is not inferred, so a column defined as DECIMAL(38) defaults to scale 0, causing the fractional portion to be silently truncated during load — even though the Dataflow preview shows decimals correctly.

Always specify precision AND scale for decimal columns, or pre-create the table before loading:
CREATE TABLE dbo.TableName
(
invoice_amount_with_net_retaining DECIMAL(38,6)
);

Then load the Dataflow into this table.

Note: The rounding does not happen in Dataflow Gen2 — it happens at insert time in the Warehouse due to implicit DECIMAL(38,0).

Thanks,
Cheri Srikanth



Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.

Top Kudoed Authors