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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
mattih
Frequent Visitor

Custom column that shows rows with the same value in one column

Hi!

I have a table like this:

Web PageArticle
FacebookArticle about cats
InstagramArticle about dogs
GoogleArticle about birds
InstagramArticle about cats

 

I would need to create a custom column that would search if the article name is exactly the same between two or more rows it would produce a custom values that tell the web pages that have the same article:

 

Web pageArticleCustom
FacebookArticle about catsFacebook & Instagram
InstagramArticle about dogsInstagram
GoogleArticle about birdsGoogle
InstagramArticle about cats

Facebook & Instagram

 

There are millions of articles in my dataset so I cant use the name of the article in the calculation. Any ideas on solving this? Thank you!

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

Hi  @mattih ,

 

Here are the steps you can follow:

In Power Query:

1. Group By – [Article] – Operation – All Rows

vyangliumsft_0-1719279644667.png

2. Add Column -- Custom Column -- Enter code:

[Count][Web Page]

vyangliumsft_1-1719279644670.png

3. [Custom] – Extract Values

vyangliumsft_2-1719279678266.png

vyangliumsft_3-1719279678267.png

3. Remove [Article]

vyangliumsft_4-1719279695027.png

4. Select [Count] -- Expand

vyangliumsft_5-1719279695028.png

5. Result:

vyangliumsft_10-1719279743471.png

Use Dax:

1. Create calculated column.

 

Custom =
CONCATENATEX(
    FILTER(ALL('Table'),
    'Table'[Article]=EARLIER('Table'[Article])),[Web Page],"&")

 

2. Result:

vyangliumsft_0-1719278490001.png

 

Best Regards,

Liu Yang

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @mattih ,

 

Here are the steps you can follow:

In Power Query:

1. Group By – [Article] – Operation – All Rows

vyangliumsft_0-1719279644667.png

2. Add Column -- Custom Column -- Enter code:

[Count][Web Page]

vyangliumsft_1-1719279644670.png

3. [Custom] – Extract Values

vyangliumsft_2-1719279678266.png

vyangliumsft_3-1719279678267.png

3. Remove [Article]

vyangliumsft_4-1719279695027.png

4. Select [Count] -- Expand

vyangliumsft_5-1719279695028.png

5. Result:

vyangliumsft_10-1719279743471.png

Use Dax:

1. Create calculated column.

 

Custom =
CONCATENATEX(
    FILTER(ALL('Table'),
    'Table'[Article]=EARLIER('Table'[Article])),[Web Page],"&")

 

2. Result:

vyangliumsft_0-1719278490001.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.