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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'm trying to distinct count ID column if the date is less than 24 hrs otherwise count duplicate. The table below I want it to count all green color only.
Date | ID | Time(delta) | |
7/19/19 10:51 PM | 131845 | ||
7/19/19 3:51 AM | 131845 | 0.791666667 | |
7/18/19 10:11 PM | 131845 | 0.235601852 | |
7/17/19 9:41 PM | 131450 | 1.02086015 | |
7/17/19 9:35 PM | 131450 | 0.004670174 | |
7/17/19 9:22 PM | 131492 | 0.00852735 | |
7/17/19 9:17 PM | 131659 | 0.003348495 | |
7/17/19 12:52 AM | 131659 | 0.850702049 | |
7/17/19 12:11 AM | 131455 | 0.02858735 | |
7/16/19 1:20 AM | 131659 | 0.95201809 |
I like to see that data table as below for count.
Date | Count |
7/19/2019 | 2 |
7/18/2019 | 0 |
7/17/2019 | 4 |
7/16/2019 | 1 |
Hi @EZiamslow
There are many ways to achieve the solution.
Can you explain the time column? What is 24 hours?
Cheers!
A
Actually, I want to see the count as this table. 24hrs between same ID row. For example, the top two rows has 1.11 days so I like to count both rows. If less then 24 hrs, I like to count as 1.
@Anonymous
It's similar to distinct count. If Date/Time between IDs are within 24hrs, count as 1. If Date/Time between IDs are more than 24hrs, count all duplicates.
Edited: I updated the table
Thanks
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.