cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LiLiBeca
New Member

Losing number of decimal places in power query

Hi, two columns from the input spreadsheet contain decimal numbers with around 7 decimal places. as below,

LiLiBeca_0-1615773129741.png

However, with the power query in the data flow, even before the data type conversion, it only shows 2 decimal places. see below,

LiLiBeca_1-1615773283611.png

Anyone know how to fix that? Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @LiLiBeca ,

 

Would you like to transport data from a spreadsheet to Dataverse using Power Query?

 

Since the X and Y columns contain 7 decimal places numbers, but when using Power Query the Decimal format only supports 3 digits of number and Float format in Dataverse only supports 0-5 digits, you will need to use Text type column in Power Query to transport data.

 

190.png

 

If your spreadsheet includes not quite large datasets, you could consider connect to the spreadsheet as the data source in Power Apps and save the whole dataset into a newly created Dataverse table. For example:

Connected to spreadsheet data table, using a button with below formula to upload all items:

ForAll(SpreadsheetTable, Patch(DataverseTable, Defaults(DataverseTable),{X: ThisRecord.X, Y:ThisRecord.Y, OtherColumns:...}))

 

After checking the uploaded records using a Gallery set Items property to the Dataverse table, if all records have been uploaded successfully, you could delete the spreadsheet and remove the submit button from your App.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-jefferni
Community Support
Community Support

Hi @LiLiBeca ,

 

Would you like to transport data from a spreadsheet to Dataverse using Power Query?

 

Since the X and Y columns contain 7 decimal places numbers, but when using Power Query the Decimal format only supports 3 digits of number and Float format in Dataverse only supports 0-5 digits, you will need to use Text type column in Power Query to transport data.

 

190.png

 

If your spreadsheet includes not quite large datasets, you could consider connect to the spreadsheet as the data source in Power Apps and save the whole dataset into a newly created Dataverse table. For example:

Connected to spreadsheet data table, using a button with below formula to upload all items:

ForAll(SpreadsheetTable, Patch(DataverseTable, Defaults(DataverseTable),{X: ThisRecord.X, Y:ThisRecord.Y, OtherColumns:...}))

 

After checking the uploaded records using a Gallery set Items property to the Dataverse table, if all records have been uploaded successfully, you could delete the spreadsheet and remove the submit button from your App.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Fubar
Solution Sage
Solution Sage

So everytime you work with a Float or decimal with more than 3 decimal places you have to set it to Text - that is crazy (particularly when you consider in CDS/Datavsere you could increase the decimal places or just take the default in Dataflow and not realise that the Dataflow is only rounding to 3 decimals).

Spot on. I totally agree. It's not intuitive for the user and it's only because we had a through verification process so we found this problem, otherwise it will be omitted.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,217)