Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi @powerbilover123 ,
I created some data:
Here are the steps you can follow:
1. Create calculated table – slicer table.
Table 2 =
CALENDAR(
DATE(2021,1,1),
DATE(2021,2,1))
2. Create measure.
Measure =
var _select=SELECTEDVALUE('Table 2'[Date])
return
SUMX(
FILTER(ALL('Table'),
'Table'[Date]=_select&&'Table'[ID]=MAX('Table'[ID])),DATEDIFF([Start_Date],[End_Date],HOUR))
3. Result:
If it doesn't meet your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @powerbilover123 ,
I created some data:
Here are the steps you can follow:
1. Create calculated table – slicer table.
Table 2 =
CALENDAR(
DATE(2021,1,1),
DATE(2021,2,1))
2. Create measure.
Measure =
var _select=SELECTEDVALUE('Table 2'[Date])
return
SUMX(
FILTER(ALL('Table'),
'Table'[Date]=_select&&'Table'[ID]=MAX('Table'[ID])),DATEDIFF([Start_Date],[End_Date],HOUR))
3. Result:
If it doesn't meet your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 27 | |
| 24 | |
| 18 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 42 | |
| 41 | |
| 39 | |
| 37 |