Forum

Iferror Transform s...
 
Notifications
Clear all

Iferror Transform skip

3 Posts
2 Users
0 Reactions
135 Views
(@lanser)
Posts: 61
Estimable Member
Topic starter
 

I am using a csv for data that I can't alter.

Using the first row as headers the majority of which are dates (40+columns 10AUG2018) is formatted as text

To keep as dates my first try was transform column to date, promote header convert this gave and error for all rows except the header.

next try after promoting convert back to number but the error prevented this

final try was 

= try Table.TransformColumnTypes(Source,{{"Column7", type date}}) otherwise Table.TransformColumnTypes(Source,{{"Column7", Int64.Type}}) 

but it still gives an error can't parse as date

 

what I would really like to do is try (This) otherwise (Do Nothing)

 
Posted : 11/08/2018 5:38 am
(@mynda)
Posts: 4761
Member Admin
 

Hi John,

What happens if you remove the first change type step that PQ automatically applies and then promote the first row as header?

If that doesn't work are you able to share a small sample CSV file and an Excel file containing the desired result that you create manually? It only needs to be the header and a few rows of the data.

Mynda

 
Posted : 12/08/2018 5:30 am
(@lanser)
Posts: 61
Estimable Member
Topic starter
 

Hi Mynda,

very strange as soon as I change anything in the query, it uploads the headers as dates and throws it all out of sync

I've attached both the original csv and my attempt at the query, I do have a parameter query first to cover for drive mappings and dropbox

 

regards

John

 
Posted : 14/08/2018 6:31 am
Share: