- 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

Count first occurance
Hi,
I have a data requirement to count only the first occurance of an event.
So if a Sales rep contacts a company, only the first contact is to be counted.
Sales Rep | Company | Month |
ABC | Company A | Jan |
ABS | Company B | Jan |
ABC | Company A | Feb |
In this example, the companies the sales rep has contacted is 2. (Company A and Company B)
When I drag in month, I get 2 for Jan, 1 for Feb. which is correct but
I dont need to count the company if it has been counted before.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
Is there a way this can be solved please?
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Can you post a screenshot with expected result?
Regards,
Kishore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
Try this,
Calculate(DistinctCount(Table[Company]), Sales, [#SalesContact] > 0,Removefilters(ales, [#Month] )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, I have used Calculate(DistinctCount(Table[Company]), Filter(Sales, [#SalesContact] > 0) this works without the month field. When I use the month field is when the company is counted for each month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @PBIfanatic ,
Can you create a measure like this and see if it is working?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi thanks for your reply @Kishore_Kadhir
Tried it but it didnt work, values came as 1 for each month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So above is not counting when ABC contacted Company A for the second time
I have also made one video on the ALLEXCEPT concept here https://youtu.be/WCMwCj29TTU
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
01-03-2025 06:14 AM | |||
03-12-2025 04:04 AM | |||
01-12-2025 10:55 PM | |||
12-17-2023 04:26 AM | |||
10-02-2024 02:36 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
60 | |
46 |