PowerQuery number columns becomes text in PowerPivot - how to avoid?

xls_mycroft

New Member
Joined
Jul 13, 2011
Messages
20
Hi,

(using Excel 2013, 32bit on a German system)

I'm having a slightly complex PowerQuery that is loaded to the DataModel/PowerPivot. The query does the following:
1. Load data from a MySQL DB, calculate some additional columns with Table.AddColumn
2. Load multiple other tables from MySQL, CSV and Excel
3. Perform left outer join between main table and other tables from (2) and (1)

When inspecting the result in PowerQuery, all looks as expected. However, in PowerPivot, the calculated columns from step (1) are imported as text (even though I used =
Code:
Table.AddColumn(..., type Number)
to define the column type. All other columns (also from the Table.Join), are imported correctly.

Changing the column type from Text to Decimal does not work due to regional settings. E.g. 50% is exported as text 0.5000. But as the client is using a German system with a , as the decimal separator, this becomes 5000. :(

Any idea how to keep the column type between PowerQuery and PowerPivot?

Thanks!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Ok, found the answer myself:

When I first imported the data to PowerPivot, I did not use the type Number parameter and PowerPivot imported the column as text. The subsequent changes of the type in PowerQuery were not carried forward to PowerPivot. So I unloaded the query from the data model - and reloaded it again, this time with the types set from the start - and all works as expected!
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,454
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top