Power Query - Help with column format

Evans2

Board Regular
Joined
Jun 11, 2015
Messages
56
Hi all,

I'm new to Power Query but I'm already really impressed by what it can do and I'm very excited about the possibilities.

I'm pulling data directly from an oracle server into Power Query and noticed that some of the columns have a strange format that I will need to change but I'm unsure how.

Some of the date fields are formatted as =T(""01-MAY-2013"") but I need the format to be 01-MAY-2013. Another is formatted as =T(""P-5201-A"") but I need the format to be P-5201-A.

Any help is greatly appreciated.

Evan
 
Hi Evan,
Got irritated by your mentioning DAX - hope you're acutally using Power Query & not Power Pivot.

To start with, I'd move on step by step. So here it would be to check if the condition check works:

for my example:
if Text.StartsWith([Date],"=T(""") then 1 else 0 (instead of: Text.Range([Date],5,11) else [Date]))

For your example: if Text.StartsWith([PERIOD_TO],"=T(""") then 1 else 0

Then you build the other elements step by step, checking each time if the correct results are delivered.

& as Bill already said: Absolutely nothing to worry about changing your source data when working with PQ.
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,224,115
Messages
6,176,467
Members
452,728
Latest member
mihael546

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