This content has been marked as final. Show 9 replies
I agree with the Manish! However, I have tweaked the definitions little bit to handle the file extensions (in this case .csv). In above example SUBJECT field will have file extension as well.
SampleData: LOAD Day, Pageviews, [Unique Visitors], SubField(Replace(FileName(),.&FileExtension(),''),'-',1) as PERIOD, SubField(Replace(FileName(),.&FileExtension(),''),'-',-1) as SUBJECT FROM [201701-Analytics.csv] (txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 6 lines);
Hope this will help.