Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
RudolphVan
Frequent Visitor

Count duplicate entries once

Hello everyone,

 

I'm currently tackling a data analysis task where I need to count the number of emails, I've encountered duplicates within the dataset. I'm looking for guidance on how to use DAX to effectively handle these duplicates and ensure accurate counts.

In the data set below User 1 would have a count of 3 emails (2 Outbound and 1 inbound) and User 2 should have a count of 2 emails (1 Outbound and 1 Inbound). 

 

EmailDirectionUserEmailed At
Demo Email - Testing Outbound User 1 - Email 1OutboundUser 12024/04/24 08:31
Demo Email - Testing Inbound User 1 - Email 1InboundUser 12024/04/24 08:37
Demo Email - Testing Inbound User 1 - Email 1InboundUser 12024/04/24 08:37
Demo Email - Testing Outbound User 1 - Email 2OutboundUser 12024/04/24 08:39
Demo Email - Testing Inbound User 2 - Email 1InboundUser 22024/04/24 08:44
Demo Email - Testing Inbound User 2 - Email 1InboundUser 22024/04/24 08:44
Demo Email - Testing Outbound User 2 - Email 1OutboundUser 22024/04/24 08:55


Any suggestions or advice would be apreciated.  

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Use the implicit "Count (Distinct)"  aggregration on these visual fields or create the equivalent measures.

View solution in original post

Anonymous
Not applicable

Hi @RudolphVan ,

Your solution is great, @lbendlin . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.

I think you can also Remove Duplicates in Power Query. I create a table as you mentioned.

vyilongmsft_1-1714094248077.png

Then I choose Remove Duplicates. 

vyilongmsft_0-1714094094561.png

Finally it will show you what you want.

vyilongmsft_3-1714094378453.png

vyilongmsft_4-1714094483073.png

 

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @RudolphVan ,

Your solution is great, @lbendlin . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.

I think you can also Remove Duplicates in Power Query. I create a table as you mentioned.

vyilongmsft_1-1714094248077.png

Then I choose Remove Duplicates. 

vyilongmsft_0-1714094094561.png

Finally it will show you what you want.

vyilongmsft_3-1714094378453.png

vyilongmsft_4-1714094483073.png

 

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much, this also worked great.

lbendlin
Super User
Super User

Use the implicit "Count (Distinct)"  aggregration on these visual fields or create the equivalent measures.

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.