Forum Discussion
M language issue
When you change it to a parameter, are you sure you are feeding it a list and not a table?
- dslForPBI8 years agoHelper I
Thanks for your response Greg_Deckler! I am sure it is not a table--which is why it seems like either an odd bug or something--here is a snippet of code with comments:
//Prep for filter using a parameter (outboundcodes) which is just a comma-delimited list of values
////
valForCodes = Value.FromText(outboundcodes),
//This one works (hardcoded)
tblIncludeStates = Table.SelectRows(tblFromDownload, each List.Contains({543,95,96,1359,1360,1104,1170,1172,93,1248,454,1361,92,97,-4,-3,-5,-7,-8,-2}, [Outstate_Code])),//This one doesn't (just results in an empty table
//
tblIncludeStates = Table.SelectRows(tblFromDownload, each List.Contains(valForCodes,[Outstate_Code])),- Greg_Deckler8 years agoCommunity Champion
Try this:
//Prep for filter using a parameter (outboundcodes) which is just a comma-delimited list of values // // valForCodes = Text.ToList(Value.FromText(outboundcodes)), //This one works (hardcoded) tblIncludeStates = Table.SelectRows(tblFromDownload, each List.Contains({543,95,96,1359,1360,1104,1170,1172,93,1248,454,1361,92,97,-4,-3,-5,-7,-8,-2}, [Outstate_Code])), //This one doesn't (just results in an empty table // tblIncludeStates = Table.SelectRows(tblFromDownload, each List.Contains(valForCodes,[Outstate_Code])),- dslForPBI8 years agoHelper I
Right..tried that..as well as trying to convert it to binary first..you just get an empty table as a result (no errors, data is fine when viewed in the applied steps)..like the filtering suddenly doesn't work..only other thing I haven't tried is changing the encoding value when converting to binary first, like perhaps the text encoding is different with hand-input values within the advanced editor (is all I can think of)..