Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a file with a column labels with a interval and months and I want to transform this content into content to the column 2, so in the column 2 I will have MTR STATIC repeated on side from january to december and MTR DIGITAL to another jan to dez interval.
I tried with split column > by positions but won't had success.
Thank you
Solved! Go to Solution.
Hi @lucasmnx ,
Format column 2 to text then do a replace values, does not matter what you put on that replace you will get a formula similar to this one:
= Table.ReplaceValue(#"Changed Type","a","aa",Replacer.ReplaceText,{"Column2"})
Now replace the value of this step by the following formula:
= Table.ReplaceValue(#"Changed Type", each [Column2] , each if Text.StartsWith ([#"In K HK$"] , "MTR") then [#"In K HK$"] else null,Replacer.ReplaceValue,{"Column2"})
Do a fill down:
Now you just need to filter out the rows that do not start with MTR:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix the solution worked perfectly (I just had to include another variable becaus I had more itens than initialazed with "MTR" but I used or with text.startwith and worked!
Thank you very much for your help!
Hi @lucasmnx ,
Format column 2 to text then do a replace values, does not matter what you put on that replace you will get a formula similar to this one:
= Table.ReplaceValue(#"Changed Type","a","aa",Replacer.ReplaceText,{"Column2"})
Now replace the value of this step by the following formula:
= Table.ReplaceValue(#"Changed Type", each [Column2] , each if Text.StartsWith ([#"In K HK$"] , "MTR") then [#"In K HK$"] else null,Replacer.ReplaceValue,{"Column2"})
Do a fill down:
Now you just need to filter out the rows that do not start with MTR:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |