Created
September 17, 2022 17:39
-
-
Save Softwaretrain/0e13904c41388e31063069ce1e923c6e to your computer and use it in GitHub Desktop.
Link of the challenge: https://www.linkedin.com/posts/excelbi_powerbi-powerquery-dax-activity-6976750557134774272-6Hyy?utm_source=share&utm_medium=member_desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("LcxBCoMwEIXhqzyyFgnd9ADdeIc0izGmphA6YWZEvL1Run3fzwvBJbIBC6/YM4mikOHDAqoVndTFITgrGXPn9+b946lolQ7F/rWCJJzuZspocpDCGFe/8jLe8CIjNeHWR/79T+MJ", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Original Text" = _t]), | |
ReplaceText=Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSk4sUdJRcgaSsTrRSiUZqUBeCJAE8ZJSE4uAXCcQBeInF+UngxQDqfyUzJzUYrBoen4KUNAdSIJ4BUWVicVAfkFRYiVQPhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [From = _t, To = _t]), | |
#"Added Custom" = Table.AddColumn(Source, "Final Text", each let | |
Translation = List.Buffer( | |
List.Zip( | |
Table.ToColumns(ReplaceText) | |
)), | |
Output=Text.Combine( | |
List.ReplaceMatchingItems( | |
Text.Split( | |
Text.Replace( | |
Text.Replace([Original Text],","," ,"), | |
"."," .") | |
," "), | |
Translation | |
)," " | |
) | |
in | |
Text.Replace( | |
Text.Replace(Output," ,",","), | |
" .",".") | |
) | |
in | |
#"Added Custom" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment