Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tinye
Regular Visitor

how to make a new column like this

Table:

L-A

B

C

L-B

C

D

E

 

My expectation:

L-AL-A

L-AB

L-AC

L-BL-B

L-BC

L-BD

L-BE

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @tinye ;

You could add conditional column in power query.

1. add conditional column.

if [Column1] = "Men"  or [Column1] = "Women"   then [Column1] else null

vyalanwumsft_0-1666934807509.png

2.Then fill down it.

vyalanwumsft_1-1666934870046.png

3.Then filter the rows(not "Men"  an "Women")

vyalanwumsft_2-1666935350078.png

The final show:

vyalanwumsft_3-1666935366638.png

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.

 

 

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @tinye ;

You could add conditional column in power query.

1. add conditional column.

if [Column1] = "Men"  or [Column1] = "Women"   then [Column1] else null

vyalanwumsft_0-1666934807509.png

2.Then fill down it.

vyalanwumsft_1-1666934870046.png

3.Then filter the rows(not "Men"  an "Women")

vyalanwumsft_2-1666935350078.png

The final show:

vyalanwumsft_3-1666935366638.png

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!

tinye
Regular Visitor

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

Fowmy
Super User
Super User

@tinye 

Van you explain the logic?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors