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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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