Forum Discussion
How to reference Text in a Cell to create a new column
- 5 years ago
Hi Anonymous
SheetCellA4 =YourWorkSheet[Column1]{3}Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- 5 years ago
Hello Anonymous
you are using an approach of accessing a xlsx-file even you are accessing a csv-file. In your case the Source-step will give you already the final table. So use this code instead
let Source = Csv.Document(File.Contents("C:\Users\cday\OneDrive - udfinc.com\M6 Scorecard\Data Pulls\4 Wk Data.csv"),[Delimiter=",", Columns=18, Encoding=1252, QuoteStyle=QuoteStyle.None]), #"Added Custom" = Table.AddColumn(Source, "Custom", each Query1(Source)) in #"Added Custom"If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Anonymous
Sure, my code is reading from a xlsx but you have a csv. Like I said, I'd need the actual csv and not the xlsx I downloaded. OR you can try to change the initial code, to adapt it to read from a csv instead of an xlsx. It shouldn't be too difficult. Just create a new query reading from your CSV and see what code PQ generates, then add my code after that. You might have to tweak it a bit
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers