1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Power query rounding issue

Our take

Encountering unexpected rounding behavior in Power Query can be frustrating, particularly when source data decimals inexplicably convert to whole numbers upon refresh. This issue frequently arises when the source workbook is closed, suggesting a data type interpretation discrepancy. While converting columns to Decimal Number or Currency often resolves such problems, it appears those methods have not worked in this case. As explored in "How to make everything a number?", these "little green things" can indicate underlying data type conflicts.

The persistent rounding issue reported by /u/TheOneWhoMurlocs highlights a frustrating quirk within Power Query and underscores the challenges of working with legacy data formats. It’s a problem many users will likely encounter, particularly those reliant on older Excel versions for data export. The core of the issue appears to stem from how Power Query interprets data types when the source workbook is closed, reverting seemingly decimal values to whole numbers upon refresh. Attempts to force a decimal or currency data type within the query itself have proven unsuccessful, pointing to a deeper interaction between Power Query’s data type detection and the underlying Excel 97-2003 format. This situation isn’t entirely new; users often grapple with ensuring correct data types, as explored in "How to make everything a number?"[/post/how-to-make-everything-a-number-cmqa5ocdj003v7cqmuy7avvk3], demonstrating the persistent need for careful data type management in Excel workflows. The workaround—converting the source workbook to a Macro-Enabled Workbook—while effective, is logistically prohibitive for the user, emphasizing the need for a more elegant solution.

The complexity is amplified by the reliance on the older Excel 97-2003 format, a legacy that continues to impact modern data workflows. This format inherently lacks some of the features and data type precision available in newer versions, creating compatibility hurdles when importing data into Power Query. While Power Query strives for intelligent data type detection, it can be tripped up by these limitations. This situation also echoes the broader challenges of data integration and transformation that users face, necessitating careful consideration of source data formats and potential inconsistencies. The need to navigate across multiple sheets within a single workbook, a common scenario as described in "how to make a search bar for the different sheets in an excel workbook"[/post/how-to-make-a-search-bar-for-the-different-sheets-in-an-exce-cmqa5o9yl003j7cqm5ufk5iey], further compounds these challenges, demanding robust data handling capabilities. It’s a reminder that even seemingly simple data tasks can be complicated by the often-unseen intricacies of data formats.

The inherent tension between modern data tools like Power Query and legacy systems is a recurring theme in the data management landscape. While Power Query offers a powerful and accessible way to transform and analyze data, its effectiveness is intrinsically tied to the quality and consistency of the underlying data sources. This case demonstrates that simply adopting a modern tool doesn't automatically solve data quality issues; it can even expose them more clearly. The user’s experience highlights the importance of understanding the nuances of data types and formats when working with external data. The community conversation around Excel usage, as reflected in "Do you actually practice Excel outside of work, or are we all just learning on the fly?"[/post/do-you-actually-practice-excel-outside-of-work-or-are-we-all-cmqa5o0fk002d7cqmgz7nw8zr], reveals a continuous learning process, where users are constantly adapting to new challenges and refining their skills to overcome such obstacles.

Ultimately, the /u/TheOneWhoMurlocs’s situation underscores the need for more robust error handling and clearer data type interpretation within Power Query, particularly when dealing with older Excel formats. While direct fixes to the legacy format are unlikely, Microsoft could potentially enhance Power Query to offer more granular control over data type conversion and provide more informative error messages when encountering discrepancies. As organizations increasingly rely on data-driven decision-making, maintaining data integrity across diverse sources—even those using older formats—becomes paramount. A key question moving forward is how Power Query can continue to empower users to transform data effectively, even when faced with the complexities of legacy systems and evolving data formats—and whether a more proactive approach to data type validation at the source is needed.

I have a rounding issue that doesn't seem to have the usual data type solution. The source data my queries are pulling from are in a decimal format. However, power query only sees those decimals as long as the source data workbook is actually open. The moment I close the workbook and refresh the query it reverts back to a whole number.

I have tried changing the applicable columns in the query to decimal number and currency with no success. The only thing that has worked was converting the source workbook from Excel 97-2003 (we use older software that exports to that) to a Macro-Enabled Workbook, which unfortunately would be time-prohibitive given the number of workbooks involved.

Any ideas?

submitted by /u/TheOneWhoMurlocs
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with

#Excel alternatives for data analysis#real-time data collaboration#big data management in spreadsheets#generative AI for data analysis#conversational data analysis#intelligent data visualization#data visualization tools#enterprise data management#big data performance#data analysis tools#data cleaning solutions#Excel compatibility#Excel alternatives#rows.com#digital transformation in spreadsheet software#financial modeling with spreadsheets#real-time collaboration#Power Query#Rounding#Data Type