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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PatP
Frequent Visitor

Count the number of times a word is repeated

Hi!

 

I want to count how many times specific words appears in all of our articles. I have 2 tables:

 

One with the articles that look like this, this is the Recipe table (each recipe is a row) :

Recipe_ID

Title

Summary

Body

565126

Chocolate Chip Cookies

The best cookie recipe

With the rack in the middle position, preheat the oven to 180 °C (350 °F). Line a large baking sheet with parchment paper.
In a bowl, combine the flour, baking powder, and salt. Set aside.
In another bowl, cream the butter and brown sugar with an electric mixer. Add the egg and vanilla and beat until smooth. At low speed or with a wooden spoon, stir in the dry ingredients and chocolate.
With a spoon, place 30 ml (2 tablespoons) of dough per cookie on a baking sheet leaving about 5-cm (2-inch) between each. Flatten slightly with your fingertips.
Bake for about 14 minutes.

 

 

And another table that contain the specific words I want to count, named Keywords :

 

Flavor

Author

Type

Chocolate

Jane

Salty

Peanut butter

Richard

Sweet

Strawberry

Elizabeth

 

Cookie dough

Donald

 

 

 

 

The final output expected should look like this (the number are the times they are repeated across all recipes):

 

Flavor

 

Chocolate

5

Peanut butter

4

Strawberry

9

Cookie dough

10

 

 

Author

 

Jane

1

Richard

3

Elizabeth

9

Donald

4

 

 

Type

 

Salty

3

Sweet

7

 

 

The goal is to search the articles (recipes) and know how many times we repeat some specific words and know if we are repeating/talking about something too much or not enough. I want to search across all the Title, summary and body (maybe I should merge all three columns first?).

 

The text might contain html code, so I want to count the word even if it is displayed as “<br>salty<br>” and count the word no matter if it is in upper or lower case. Finally, I would like to be able to count a word starting with a specific part. Like words starting with “salt” to include Salty ( I might have to change my keyword table for that, or maybe there I solution where I don’t need the keyword table since I would need to enter a specific formula for each words?)

 

How to achieve this? What is the most simple way to do it? Please help me! 🙂

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

Please explore the Word Clod visual.  It is a custom visual that you can download from the Custom Visual gallery.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

Thank you for your suggestion, but this is not what I'm looking for. I really need to quantify the repeats of some specific words, so I can add the count for similar word and rank them.

Hi,

 

I do not know how much i can help here but i can try.  Could you kinldy share a few more rows which you have in your base data table and a final list of keywords.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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