Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, @tinye ;
You could add conditional column in power query.
1. add conditional column.
if [Column1] = "Men" or [Column1] = "Women" then [Column1] else null
2.Then fill down it.
3.Then filter the rows(not "Men" an "Women")
The final show:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k3NU4rViVZyBJNOYDI8Pxcq6gwmXcCkK5h0A5PuSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [Column1] = "Men" or [Column1] = "Women" then [Column1] else null),
#"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Custom"}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each [Column1] <> "Men" and [Column1] <> "Women")
in
#"Filtered Rows"
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, @tinye ;
You could add conditional column in power query.
1. add conditional column.
if [Column1] = "Men" or [Column1] = "Women" then [Column1] else null
2.Then fill down it.
3.Then filter the rows(not "Men" an "Women")
The final show:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k3NU4rViVZyBJNOYDI8Pxcq6gwmXcCkK5h0A5PuSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [Column1] = "Men" or [Column1] = "Women" then [Column1] else null),
#"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Custom"}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each [Column1] <> "Men" and [Column1] <> "Women")
in
#"Filtered Rows"
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.
Great! Works! Thanks so much!
Hi,
Okay, I can have a more clear example.
I have a table which I can't edit it, but it has some categorize like:
Column 1
Men
A
B
Women
C
D
E
F
I want to split two columns like:
Column1 Column2
A Men
B Men
C Women
D Women
E Women
F Women
@tinye
Van you explain the logic?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |