Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello
I need to create a column that says how many times the information is repeated in a column.
For example, I have a table where each row represents a sale, and in each of these rows there is the name of the salesperson; I need to create a column in this table that says how many times the seller's name is repeated, without using groupings.
| Seller | Date | Value | Count |
| Rafael | 11/08/2022 | 100 | 3 |
| José | 11/08/2022 | 200 | 1 |
| Zé | 11/08/2022 | 300 | 1 |
| João | 11/08/2022 | 400 | 1 |
| Zezinho | 11/08/2022 | 500 | 1 |
| Rafael | 11/08/2022 | 600 | 3 |
| Rafael | 11/08/2022 | 700 | 3 |
Solved! Go to Solution.
Hi,
Create this calculated column formula
=calculate(countrows(Data),filter(Data,Data[seller]=earlier([seller])))
Hope this helps.
Hey there,
In old days it was done by EARLIER function but now you can use varibales to do it.
You can watch this video too.
https://www.youtube.com/watch?v=JI-QUASKuUw
Hi @RafaelCM ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Create this calculated column formula
=calculate(countrows(Data),filter(Data,Data[seller]=earlier([seller])))
Hope this helps.
thank you so much
however I have one more problem, in the dashboard I have a data filter, how do I make this formula obey the data filter? should I create a measure instead of a column? Does this formula also work if you are going to use it in a measure?
This formula's result will not update based on a slicer selection - only measures do. Why should the count change based on a date slicer selection. Share some data and show the expected result.
Hi
Option 1: create an Summarize Table, use CountX funtion, then Look up back
Option 2:
create measure
name_seller = SELECTEDVALUE (Seller column)
create column
count =
var a = measure name_seller
return COUNTX ( FILTER (table, Seller column = a), Seller column )
Multiple solutions posted to similar question, but this is what worked for me.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |