Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
This might be a simple question but I am q bit stuck with it.
Data is formatted like this (Table1):
Company; Sales-date
Acme Inc; 01.01.2022
Acme Inc; 02.01.2022
Acme Inc; 03.01.2022
Acme Inc; 04.01.2022
Customer Corp; 05.01.2022
Customer Corp; 06.01.2022
Customer Corp; 07.01.2022
SMB Ltd; 08.01.2022
SMB Ltd; 09.01.2022
Company column is a text field and I would like to summarize how many occurences there is for each value. For example, how many sales interactions was there in January for each company.
I would expect results like this for given data in report table: Company; number of sales activities:
Acme Inc; 4
Customer Corp; 3
SMB Ltd; 08.01.2022
I am adding a measurement like this:
Measure = COUNTROWS(filter(Table1, Table1[Company] = EARLIER(Company)))
This provides error:
EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
I am doing something wront, but what?
Kind Regards,
Harri
Solved! Go to Solution.
Hi,
COUNT should work for your example. E.g.
In your measure you used EARLIER. EARLIER should be used in the context of calculated columns.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Thank you ValtteriN, this did the job! Much appriciated!
Hi,
COUNT should work for your example. E.g.
In your measure you used EARLIER. EARLIER should be used in the context of calculated columns.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |