Forum Discussion
Anonymous
8 years agoNot applicable
Sum Data after every 30mins
Hi,
My data is in every 5 mins but I need to sum it after every 30 mins.
Please any workaround or DAX to achieve this??
See Sample Data Below:
| DataTime | FLOW |
| 01/09/2017 00:00 | 0 |
| 01/09/2017 00:01 | 0.2 |
| 01/09/2017 00:05 | 0 |
| 01/09/2017 00:05 | 0.2 |
| 01/09/2017 00:10 | 0 |
| 01/09/2017 00:10 | 0.3 |
| 01/09/2017 00:15 | 0 |
| 01/09/2017 00:16 | 0.2 |
| 01/09/2017 00:20 | 0 |
| 01/09/2017 00:21 | 0.2 |
| 01/09/2017 00:25 | 0 |
| 01/09/2017 00:25 | 0.3 |
| 01/09/2017 00:30 | 0 |
| 01/09/2017 00:31 | 0.2 |
| 01/09/2017 00:35 | 0 |
| 01/09/2017 00:35 | 0.3 |
| 01/09/2017 00:41 | 0 |
| 01/09/2017 00:41 | 0.2 |
| 01/09/2017 00:45 | 0 |
| 01/09/2017 00:45 | 0.2 |
| 01/09/2017 00:50 | 0 |
| 01/09/2017 00:51 | 0.3 |
| 01/09/2017 00:55 | 0 |
| 01/09/2017 00:56 | 0.2 |
| 01/09/2017 01:00 | 0 |
| 01/09/2017 01:01 | 0.2 |
| 01/09/2017 01:05 | 0 |
| 01/09/2017 01:06 | 0.3 |
| 01/09/2017 01:10 | 0 |
| 01/09/2017 01:11 | 0.2 |
| 01/09/2017 01:15 | 0 |
| 01/09/2017 01:15 | 0.3 |
| 01/09/2017 01:20 | 0 |
| 01/09/2017 01:21 | 0.2 |
| 01/09/2017 01:25 | 0.2 |
| 01/09/2017 01:30 | 0 |
7 Replies
- v-sihou-msftMicrosoft Employee
Anonymous
In this scenario, you need to add Hour, Minute, and Date column in your table. Then create a first/second half hour bucket column based on Minute column. Now you can create measure to sum the Flow total group on Date, Hour, and Half Hour.
Hour = HOUR(Table6[DataTime])
Date = Table6[DataTime].[Date]
Minute = MINUTE(Table6[DataTime])
Half Hour = IF(Table6[Minute]<=30,"First Half","Second Half")
Half Hourly Total = CALCULATE ( SUM ( Table6[FLOW] ), ALLEXCEPT ( Table6, Table6[Date], Table6[Hour], Table6[Half Hour] ) )Regards,
- AnonymousNot applicable
Hi,
Please how do I create Hour, Minute, and Date column.
How do I create a first/second half hour bucket column based on Minute column. ?/
Many Thanks
- v-sihou-msftMicrosoft Employee
Anonymous
See my updated reply.