Forum Discussion
Expression.Error: 3 arguments were passed to a function which expects between 1 and 2.
- 2 years ago
Hello - it's the Text.Combine statement. It accepts a list of text to be combined and an optional delimiter character as text, which would be 1 or 2 arguments. Sometimes it helps to break up the script with indentions.
Text.Combine(texts as list, optional separator as nullable text) as textHere is the explaination of your actual script....the same comments apply to the second Text.Combine statement.
If you want to filter the rows for results that include a particular date within a text column, you can do it like this, which saves the current date to a variable and then selects rows which contain the date in that format. You can modify the date variable to meet your needs, or if you can provide an example of what your dates look like and an example of what you are trying to filter for, I'll be happy to help some more. Pls let me know if you have any questions.
#"Filtered Rows" = Table.SelectRows( #"Added Custom", let CurrentDate = Date.ToText ( Date.From ( DateTime.FixedLocalNow() ), "yyyyMMdd" ) in each Text.Contains([Custom], CurrentDate) )
Thank you for your answer, now my script is working.
Ideally I would like to filter only Month To Date folders. I have folder structure like .../yyyy/MM/dd/.... in ASDL 2. So if today is 2023/08/21 I want to load all the files from 2023/07/21 to 2023/08/21. But since the Folder path column in ADSL 2 loading is text, I'm not sure how to easily do this dynamic filtering.
I recommend you add a new column to the table which extracts the date portion of the folder path, then convert it to a date and filter the table for rows in the desired date range.