- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How many times data from column appears in other column
Hello PBI friends
I have, probably simple, problem but I am stucked and going around like in rounabout road.
Have to produce column that will be based on appearance of the same data (for example from column 2) in another column ( for example column 3).
Example:
Product A can be sold in many countries. I have to know in how many countries it is sold? Desired solution is Apperas in #Country (green header)
Thanks, a lot. I am still learning so I hope once I will be able to help to someone.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Creation of the following column can help you with this situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Creation of the following column can help you with this situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I knew it - so simple
Thanks a lot.
You earned pizza - when you come to Croatia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you,... For the free food😂.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

In Power BI, you can achieve this by creating a new calculated column in your table that counts how many times a value from one column appears in another column. In your case, you want to count how many countries each product appears in. Here's how you can do it:
Open your Power BI report and go to the "Model" view.
In the "Fields" pane, select the table where you want to create the new calculated column.
Click on the "Modeling" tab in the top menu.
Click on "New Column."
In the formula bar that appears at the top, enter the following DAX formula:
Country Count = COUNTROWS( FILTER( YourTableName, YourTableName[Product] = EARLIER(YourTableName[Product]) ) )
Replace YourTableName with the actual name of your table and Product with the name of the column containing the product names.
- Press Enter to create the new column.
This DAX formula creates a new column called "Country Count" that counts how many times each product appears in the same table based on the product name. It uses the COUNTROWS function along with the FILTER function to count the rows where the product name matches the current row's product name.
Now, you should see a new column in your table that shows the count of countries for each product. You can use this column in your visuals to see how many countries each product is sold in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks, your proposal is giving me how many times at all apears in some country (can be multiple times in one country)
Altought ...
"CountryCount=calculate(DistinctCOUNT('Table'[Country]), Filter('Table', 'Table'[Product] = EARLIER('Table'[Product])))" it is counting some country just once.

Helpful resources
Join our Fabric User Panel
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Power BI Monthly Update - June 2025
Check out the June 2025 Power BI update to learn about new features.

User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
61 | |
46 | |
45 |