Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I'm new to power BI and power query and i'm blocking on something : i'm trying to move the content of a colum that is between two series of letters. For example, i'm trying to move the content between "DSY" to the column named "DSY" and do this with all the column to reorganise everything.
I've tried with conditional column but can't go further and i don't understand
Thank you for your help
Solved! Go to Solution.
Hi, @Anonymous ;
You could add funtion as follows:
= List.PositionOf(#"Changed Type"[DSS],"DSY",2)
= List.Min(_postition)
= List.Max(_postition)
if List.PositionOf(#"Changed Type"[DSS],[DSS])>=_min and List.PositionOf(#"Changed Type"[DSS],[DSS])<=_max then [DSS] else null
The final show:
The M language:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjU0UorViVYyMoIyTE3NTMEMMOESHAmRNjQyhDCMwZSZqSFCkZGxEYpiiDkmZiZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DSS = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DSS", type text}}),
_postition=List.PositionOf(#"Changed Type"[DSS],"DSY",2),
_min=List.Min(_postition),
_max=List.Max(_postition),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if List.PositionOf(#"Changed Type"[DSS],[DSS])>=_min and List.PositionOf(#"Changed Type"[DSS],[DSS])<=_max then [DSS] else null
)
in
#"Added Custom"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could add funtion as follows:
= List.PositionOf(#"Changed Type"[DSS],"DSY",2)
= List.Min(_postition)
= List.Max(_postition)
if List.PositionOf(#"Changed Type"[DSS],[DSS])>=_min and List.PositionOf(#"Changed Type"[DSS],[DSS])<=_max then [DSS] else null
The final show:
The M language:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjU0UorViVYyMoIyTE3NTMEMMOESHAmRNjQyhDCMwZSZqSFCkZGxEYpiiDkmZiZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DSS = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DSS", type text}}),
_postition=List.PositionOf(#"Changed Type"[DSS],"DSY",2),
_min=List.Min(_postition),
_max=List.Max(_postition),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if List.PositionOf(#"Changed Type"[DSS],[DSS])>=_min and List.PositionOf(#"Changed Type"[DSS],[DSS])<=_max then [DSS] else null
)
in
#"Added Custom"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |