Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, I have data with the date/time that a sale occurred, and I need to make a table that gathers sales for all days of a certain time interval.
For example:
10/10/2020 09:15 = $50
11/10/2020 09:40 = $150
12/10/2020 09:50 = $50
10/13/2020 10:09 = $350
In the break:
- 9:00 am to 10:00 am sold in total = $250
- 10:00 am to 11:00 am sold in total = $350
Solved! Go to Solution.
@Felipe_Nery , You can create a time table with buckets and use that. First split date and time from datetime in power query or DAX.
In DAX
Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))
DateTime.Date([datetime])
Time = [datetime].Time
or
Time = Time(hour([datetime]),minute([datetime]),second([datetime]))
Create a time table join with time and use that
https://kohera.be/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/
Add hourly bucket like
time([Hour],0,0) & " - " time([Hour]+1,0,0)
sort this on hour if needed
@Felipe_Nery , You can create a time table with buckets and use that. First split date and time from datetime in power query or DAX.
In DAX
Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))
DateTime.Date([datetime])
Time = [datetime].Time
or
Time = Time(hour([datetime]),minute([datetime]),second([datetime]))
Create a time table join with time and use that
https://kohera.be/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/
Add hourly bucket like
time([Hour],0,0) & " - " time([Hour]+1,0,0)
sort this on hour if needed
Thank you, I spent days trying. I am Brazilian, and here I didn't find any tutorial about it.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |