Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello
I am looking count the number of times "CustomerX" appears in a single column on a given date. For Example, Bob appears twice on 11/13 and once on 11/14.
I have tried using COUNTX and SUMX but it counted all occurences instead of just for a single date. Once the occurence for the date is found I would like to create a new column or measure that shows if the occurence in one day is greater than 2 it populates column as "Frequent"
Date - Employee Name - Customer Name
11/13/2020 | Employee 1 | Bob |
11/13/2020 | Employee 2 | Jen |
11/13/2020 | Employee 3 | Bob |
11/13/2020 | Employee 4 | Max |
11/14/2020 | Employee 3 | Bob |
Solved! Go to Solution.
@Anonymous
Add the following code as new column:
Occurrence =
IF(
COUNTROWS(
FILTER(
Table01,
Table01[Customer Name] = EARLIER(Table01[Customer Name]) &&
Table01[Date] = EARLIER(Table01[Date])
)
) > 2,
"Frequent"
)
If you need a measure, then add a table visual, keep Date and Customer name then add the following measure
Occurrence Measure = IF( COUNTROWS(Table01) > 2 , "Frequent")
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Add the following code as new column:
Occurrence =
IF(
COUNTROWS(
FILTER(
Table01,
Table01[Customer Name] = EARLIER(Table01[Customer Name]) &&
Table01[Date] = EARLIER(Table01[Date])
)
) > 2,
"Frequent"
)
If you need a measure, then add a table visual, keep Date and Customer name then add the following measure
Occurrence Measure = IF( COUNTROWS(Table01) > 2 , "Frequent")
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you very much! The IF function worked for me.
Hi @Anonymous
1. Place Date in the rows of a matrix visual and Customer name in the columns
2. Create this measure and place it in values of the visual:
Measure =
IF ( COUNT ( TAble1[Customer Name] ) > 2, "Frequent" )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
8 |