Forum Discussion
cyclic reference when using Table.selectRows
- 5 years ago
Hi Anonymous ,
You should use the table name which is created by"Enter Date" after the function of "Table.SelectRows",rather than the one from CSV.
See my sample below:
For the related sample .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
you probably used some name in the query that matches the query name. Is your query called "testing" by any chance?
but if you put the entire script and the names given to the queries, maybe you can get more precise answers.
- Anonymous5 years agoNot applicable
Hello, thank you very much for your reply.
I do not use any same name.
please see the script of my sample file and the list I created by Enter Data
Sample:
let
Source = Csv.Document(File.Contents("C:\Users\NCC7FE\Desktop\Sample file.csv"),[Delimiter=",", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Export Country", type text}, {"Import Country", type text}, {"Product", type text}, {"Price", Int64.Type}, {"Supplier", type text}}),
Custom1 = Table.SelectRows(Sample, each List.Contains(CountryCode,[Export Country]))
in
Custom1List:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8gpQitWJVvIOAlO+EWDKI1QpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CountryCode = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"CountryCode", type text}}),
CountryCode1 = #"Changed Type"[CountryCode]
in
CountryCode1