Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 49103

Re: WHERE statement

$
0
0

One way in "M" would be to use Text.StartsWith like so:

 

let
    Source = Csv.Document(File.Contents("C:\temp\powerbi\like.csv"),[Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(Source),
    #"Added Custom" = Table.AddColumn(#"Promoted Headers", "Custom", each if Text.StartsWith([column2],"6980") then 1 else 0),
    Custom = #"Added Custom"{0}[Custom]
in
    Custom

Make sure you column (column2) is Text and then you can filter the resulting column to just 1.


Viewing all articles
Browse latest Browse all 49103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>