The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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).
Direction | User | Emailed At | |
Demo Email - Testing Outbound User 1 - Email 1 | Outbound | User 1 | 2024/04/24 08:31 |
Demo Email - Testing Inbound User 1 - Email 1 | Inbound | User 1 | 2024/04/24 08:37 |
Demo Email - Testing Inbound User 1 - Email 1 | Inbound | User 1 | 2024/04/24 08:37 |
Demo Email - Testing Outbound User 1 - Email 2 | Outbound | User 1 | 2024/04/24 08:39 |
Demo Email - Testing Inbound User 2 - Email 1 | Inbound | User 2 | 2024/04/24 08:44 |
Demo Email - Testing Inbound User 2 - Email 1 | Inbound | User 2 | 2024/04/24 08:44 |
Demo Email - Testing Outbound User 2 - Email 1 | Outbound | User 2 | 2024/04/24 08:55 |
Any suggestions or advice would be apreciated.
Solved! Go to Solution.
Use the implicit "Count (Distinct)" aggregration on these visual fields or create the equivalent measures.
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.
Then I choose Remove Duplicates.
Finally it will show you what you want.
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.
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.
Then I choose Remove Duplicates.
Finally it will show you what you want.
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.
Use the implicit "Count (Distinct)" aggregration on these visual fields or create the equivalent measures.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |