<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic M language issue in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375354#M11167</link>
    <description>&lt;P&gt;OK..this makes no sense to me..I am trying to take a list of numbers and use them as part of a "List.Contains" for a filter...if I hardcode the number list as in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each List.Contains({1,2,3...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the filter works perfectly but if I make the list a parameter, then source that it doesn't, even if I use other functions like "Value.From" or convert it using Binary.From or some other function..it doesn't error out, just doesn't work..what gives?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 16:14:29 GMT</pubDate>
    <dc:creator>dslForPBI</dc:creator>
    <dc:date>2018-03-13T16:14:29Z</dc:date>
    <item>
      <title>M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375354#M11167</link>
      <description>&lt;P&gt;OK..this makes no sense to me..I am trying to take a list of numbers and use them as part of a "List.Contains" for a filter...if I hardcode the number list as in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each List.Contains({1,2,3...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the filter works perfectly but if I make the list a parameter, then source that it doesn't, even if I use other functions like "Value.From" or convert it using Binary.From or some other function..it doesn't error out, just doesn't work..what gives?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 16:14:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375354#M11167</guid>
      <dc:creator>dslForPBI</dc:creator>
      <dc:date>2018-03-13T16:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375357#M11168</link>
      <description>&lt;P&gt;When you change it to a parameter, are you sure you are feeding it a list and not a table?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 16:23:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375357#M11168</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-03-13T16:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375399#M11169</link>
      <description>&lt;P&gt;Thanks for your response Greg_Deckler!&amp;nbsp; 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:&lt;/P&gt;&lt;P&gt;//Prep for filter using a parameter (outboundcodes) which is just a comma-delimited list of values&lt;BR /&gt;//&lt;/P&gt;&lt;P&gt;//&lt;BR /&gt;valForCodes = Value.FromText(outboundcodes),&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//This one works (hardcoded)&lt;BR /&gt;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])),&lt;/P&gt;&lt;P&gt;//This one doesn't (just results in an empty table&lt;/P&gt;&lt;P&gt;//&lt;BR /&gt;tblIncludeStates = Table.SelectRows(tblFromDownload, each List.Contains(valForCodes,[Outstate_Code])),&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 17:10:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375399#M11169</guid>
      <dc:creator>dslForPBI</dc:creator>
      <dc:date>2018-03-13T17:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375411#M11170</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//Prep for filter using a parameter (outboundcodes) which is just a comma-delimited list of values
//
//
valForCodes = &lt;FONT color="#ff0000"&gt;Text.ToList(&lt;/FONT&gt;Value.FromText(outboundcodes)&lt;FONT color="#ff0000"&gt;)&lt;/FONT&gt;,

//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])),&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 17:26:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375411#M11170</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-03-13T17:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375418#M11171</link>
      <description>&lt;P&gt;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)..&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 17:39:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375418#M11171</guid>
      <dc:creator>dslForPBI</dc:creator>
      <dc:date>2018-03-13T17:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375432#M11173</link>
      <description>&lt;P&gt;What does your raw data look like? Is it just that comma-delimited text or ? Can you post what your raw data looks like or an example/sample of what it looks like?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:16:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375432#M11173</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-03-13T18:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375449#M11174</link>
      <description>&lt;P&gt;..sure..so what's happening is as I showed in the previous snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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])),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;..this works fine when you have it like this on raw data like Outstate_Code = 543, Outstate_Ode = 95, etc (it includes the rows in output)..but if I try and use parameter "P1" where P1 = 543,95,96..it fails..I also figured out why Text.ToList fails because the list becomes:&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;...and so on.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:32:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375449#M11174</guid>
      <dc:creator>dslForPBI</dc:creator>
      <dc:date>2018-03-13T18:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375456#M11175</link>
      <description>&lt;P&gt;OK, invoking&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1522"&gt;@ImkeF&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:46:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375456#M11175</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-03-13T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375459#M11176</link>
      <description>&lt;P&gt;I did come up with this, not sure if it helps you or not though. But, I end up with a List of values:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("FYmxDQAgCMB+cS6JCKjcYvz/DXFpmvacFm5kkBO1yMLsqHYvrG9rkIYO33j4/0pWW4gjhgRSvpHR7n0=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [MyList = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"MyList", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "CSV", each Csv.Document([MyList],null,",")),
    #"Expanded CSV" = Table.ExpandTableColumn(#"Added Custom", "CSV", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12", "Column13", "Column14", "Column15", "Column16", "Column17", "Column18", "Column19", "Column20"}, {"CSV.Column1", "CSV.Column2", "CSV.Column3", "CSV.Column4", "CSV.Column5", "CSV.Column6", "CSV.Column7", "CSV.Column8", "CSV.Column9", "CSV.Column10", "CSV.Column11", "CSV.Column12", "CSV.Column13", "CSV.Column14", "CSV.Column15", "CSV.Column16", "CSV.Column17", "CSV.Column18", "CSV.Column19", "CSV.Column20"}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Expanded CSV", {"MyList"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"MyList", "Attribute"}),
    Value = #"Removed Columns"[Value]
in
    Value&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:50:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375459#M11176</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-03-13T18:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375473#M11180</link>
      <description>&lt;P&gt;Nice..unfortunately no, it doesn't work..that List.Contains is doing something really weird which I suspect has something to do with encoding.&amp;nbsp; You end up with an empty list as a result..thanks though for all your efforts!!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 19:25:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375473#M11180</guid>
      <dc:creator>dslForPBI</dc:creator>
      <dc:date>2018-03-13T19:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: M language issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375493#M11181</link>
      <description>&lt;P&gt;This sounds as if your parameter isn't actually a list, but a text-string (otherwise the function Text.ToList wouldn't work)&lt;/P&gt;&lt;P&gt;You said your parameter is: P1 = 543,95,96&lt;/P&gt;&lt;P&gt;To make this a list, you would have to wrap it into curly brackets like this: P1 = {543, 95, 96}&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 19:49:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/M-language-issue/m-p/375493#M11181</guid>
      <dc:creator>ImkeF</dc:creator>
      <dc:date>2018-03-13T19:49:29Z</dc:date>
    </item>
  </channel>
</rss>

