- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Group data and sum by time frame ( last 8 hours, last 24 hours, last 48 hours and last 7 days)
Hi All,
I have the following dataset and i would like to create 4 measures to get the total quantity per last 8 hours, total quantity per last 24 hours, total quantity per last 48 hours and total quantity per last 7 days.
DateTime | Quantity |
19/06/2022 14:12 | 280 |
19/06/2022 14:11 | 280 |
19/06/2022 14:09 | 280 |
19/06/2022 14:11 | 280 |
19/06/2022 14:09 | 280 |
19/06/2022 14:12 | 280 |
19/06/2022 14:29 | 224 |
19/06/2022 14:29 | 224 |
19/06/2022 14:32 | 80 |
19/06/2022 14:22 | 80 |
19/06/2022 14:22 | 80 |
19/06/2022 14:32 | 80 |
I am not exactly sure what to specify in the SUMMARIZE () function to be able to group my data based on the above time frames.
Thank you in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Click here to download a solution
Look at the measures
Nowdatetime gets the date and time of the last record.
Change this to your system time if required.
8 hoursago, 24hours ago, 48hours ago and 7days ago get the correct datetime
but subtracting TIME value from Nowdatetime
Qty in period calculates the sum of the quantity >= the selected period
Thanks for reaching out for help.
I have helped you, now please help me by giving kudos.
Remeber we are unpaid volunteers.
Click the thumbs up and accept as solution button.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Click here to download a solution
Look at the measures
Nowdatetime gets the date and time of the last record.
Change this to your system time if required.
8 hoursago, 24hours ago, 48hours ago and 7days ago get the correct datetime
but subtracting TIME value from Nowdatetime
Qty in period calculates the sum of the quantity >= the selected period
Thanks for reaching out for help.
I have helped you, now please help me by giving kudos.
Remeber we are unpaid volunteers.
Click the thumbs up and accept as solution button.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, I loved the date time DAX questions. Glad my solution helped you.

Helpful resources
User | Count |
---|---|
13 | |
11 | |
10 | |
10 | |
9 |