Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I am new to power bi and i would like to know if there is any way to remove some words within the whole column?
For eg. The variables within the property row are:
I would like to remove the words "Entire", "Private room in", "Room in", "Shared room in"
Thank you very much in advance!
Solved! Go to Solution.
Here is another one...
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs0rySxKVUjOz0vJV4rViVYKKMosSyxJVSjKz89VyMxTSCxILCrJTc0rAcsGQUUz8ktSc8AiPvlpqFKoGoIzEotSU+Cm4bYHYWJIZl4lkFtanIpuAoZGpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [OldText = _t]),
Words = {"Entire", "Private room in", "Room in", "Shared room in"},
FINAL = Table.AddColumn(Source, "NewText", each
Text.Trim (List.Accumulate( {0..List.Count(Words)-1}, [OldText],
(s,c) => Text.Replace( s, Words{c}, "" ))))
in
FINAL
Here is another one...
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs0rySxKVUjOz0vJV4rViVYKKMosSyxJVSjKz89VyMxTSCxILCrJTc0rAcsGQUUz8ktSc8AiPvlpqFKoGoIzEotSU+Cm4bYHYWJIZl4lkFtanIpuAoZGpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [OldText = _t]),
Words = {"Entire", "Private room in", "Room in", "Shared room in"},
FINAL = Table.AddColumn(Source, "NewText", each
Text.Trim (List.Accumulate( {0..List.Count(Words)-1}, [OldText],
(s,c) => Text.Replace( s, Words{c}, "" ))))
in
FINAL
let
Kw = {"Entire", "Private room in", "Room in", "Shared room in"},
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs0rySxKVUjOz0vJV4rViVYKKMosSyxJVSjKz89VyMxTSCxILCrJTc0rAcsGQUUz8ktSc8AiPvlpqFKoGoIzEotSU+Cm4bYHYWJIZl4lkFtanIpuAoZGpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Type = _t]),
#"Added Custom" = Table.AddColumn(Source, "New", each List.Accumulate(Kw, [Type], (s,c) => let pos=Text.PositionOf(s,c,1,Comparer.OrdinalIgnoreCase) in if pos<>-1 then Text.Trim(Text.RemoveRange(s,pos,Text.Length(c))) else s))
in
#"Added Custom"
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |