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.
Hi,
I came across the following challange. I have the following table that contains only 3 columns.
It represents daily data (Date), 5 minutes interval time (Operation's Time Blocks) and the values that I am intrested in (processed stuff). What I want to calculate is the maximum value of processed stuff within 1 hour period.
So below is the graphic ilustration of data and I need to figure out between what time the number of processed stuff (sum) was the higest and what is it's value.
Looking at above chart it's probably time somwhere between 05:30 and 06:30 but what's the value of processed stuff and how to calculate it?
I hope no one will get as much headache on this as exercise as I did.. 🙂
Solved! Go to Solution.
Hi @Pawel-Widawski ,
I think you can try to create a calculated column to the max processed stuff in each 1 hour period.
MaxHour =
CALCULATE (
MAX ( 'Table'[processed stuff] ),
FILTER (
'Table',
'Table'[Date] = EARLIER ( 'Table'[Date] )
&& HOUR ( 'Table'[Operation's Time Blocks] )
= HOUR ( EARLIER ( 'Table'[Operation's Time Blocks] ) )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for advice, here is the sample table for this task.
Date | Operation's Time Blocks | processed stuff |
01.03.2022 | 04:00:00 | 0 |
01.03.2022 | 04:05:00 | 0 |
01.03.2022 | 04:10:00 | 0 |
01.03.2022 | 04:15:00 | 0 |
01.03.2022 | 04:20:00 | 0 |
01.03.2022 | 04:25:00 | 9 |
01.03.2022 | 04:30:00 | 95 |
01.03.2022 | 04:35:00 | 244 |
01.03.2022 | 04:40:00 | 335 |
01.03.2022 | 04:45:00 | 583 |
01.03.2022 | 04:50:00 | 745 |
01.03.2022 | 04:55:00 | 879 |
01.03.2022 | 05:00:00 | 1034 |
01.03.2022 | 05:05:00 | 1180 |
01.03.2022 | 05:10:00 | 1347 |
01.03.2022 | 05:15:00 | 1526 |
01.03.2022 | 05:20:00 | 1759 |
01.03.2022 | 05:25:00 | 1933 |
01.03.2022 | 05:30:00 | 1912 |
01.03.2022 | 05:35:00 | 1864 |
01.03.2022 | 05:40:00 | 1904 |
01.03.2022 | 05:45:00 | 1743 |
01.03.2022 | 05:50:00 | 1769 |
01.03.2022 | 05:55:00 | 1778 |
01.03.2022 | 06:00:00 | 1754 |
01.03.2022 | 06:05:00 | 1695 |
01.03.2022 | 06:10:00 | 1638 |
01.03.2022 | 06:15:00 | 1557 |
01.03.2022 | 06:20:00 | 1357 |
01.03.2022 | 06:25:00 | 1249 |
01.03.2022 | 06:30:00 | 1228 |
01.03.2022 | 06:35:00 | 1222 |
01.03.2022 | 06:40:00 | 1191 |
01.03.2022 | 06:45:00 | 1224 |
01.03.2022 | 06:50:00 | 1127 |
01.03.2022 | 06:55:00 | 1082 |
01.03.2022 | 07:00:00 | 1047 |
01.03.2022 | 07:05:00 | 988 |
01.03.2022 | 07:10:00 | 881 |
01.03.2022 | 07:15:00 | 784 |
01.03.2022 | 07:20:00 | 753 |
01.03.2022 | 07:25:00 | 677 |
01.03.2022 | 07:30:00 | 634 |
01.03.2022 | 07:35:00 | 539 |
01.03.2022 | 07:40:00 | 439 |
01.03.2022 | 07:45:00 | 383 |
01.03.2022 | 07:50:00 | 400 |
01.03.2022 | 07:55:00 | 393 |
01.03.2022 | 08:00:00 | 397 |
01.03.2022 | 08:05:00 | 410 |
01.03.2022 | 08:10:00 | 514 |
01.03.2022 | 08:15:00 | 557 |
01.03.2022 | 08:20:00 | 578 |
01.03.2022 | 08:25:00 | 621 |
01.03.2022 | 08:30:00 | 647 |
01.03.2022 | 08:35:00 | 699 |
01.03.2022 | 08:40:00 | 754 |
01.03.2022 | 08:45:00 | 769 |
01.03.2022 | 08:50:00 | 695 |
01.03.2022 | 08:55:00 | 719 |
01.03.2022 | 09:00:00 | 873 |
01.03.2022 | 09:05:00 | 1036 |
01.03.2022 | 09:10:00 | 1013 |
01.03.2022 | 09:15:00 | 1004 |
01.03.2022 | 09:20:00 | 1098 |
01.03.2022 | 09:25:00 | 1219 |
01.03.2022 | 09:30:00 | 1405 |
01.03.2022 | 09:35:00 | 1552 |
01.03.2022 | 09:40:00 | 1677 |
01.03.2022 | 09:45:00 | 1757 |
01.03.2022 | 09:50:00 | 1822 |
01.03.2022 | 09:55:00 | 1758 |
01.03.2022 | 10:00:00 | 1576 |
01.03.2022 | 10:05:00 | 1465 |
01.03.2022 | 10:10:00 | 1418 |
01.03.2022 | 10:15:00 | 1462 |
01.03.2022 | 10:20:00 | 1458 |
01.03.2022 | 10:25:00 | 1403 |
01.03.2022 | 10:30:00 | 1210 |
01.03.2022 | 10:35:00 | 1014 |
01.03.2022 | 10:40:00 | 845 |
01.03.2022 | 10:45:00 | 691 |
01.03.2022 | 10:50:00 | 592 |
01.03.2022 | 10:55:00 | 560 |
01.03.2022 | 11:00:00 | 500 |
01.03.2022 | 11:05:00 | 406 |
01.03.2022 | 11:10:00 | 370 |
01.03.2022 | 11:15:00 | 323 |
01.03.2022 | 11:20:00 | 272 |
01.03.2022 | 11:25:00 | 209 |
01.03.2022 | 11:30:00 | 262 |
01.03.2022 | 11:35:00 | 322 |
01.03.2022 | 11:40:00 | 314 |
01.03.2022 | 11:45:00 | 353 |
01.03.2022 | 11:50:00 | 434 |
01.03.2022 | 11:55:00 | 460 |
01.03.2022 | 12:00:00 | 447 |
01.03.2022 | 12:05:00 | 447 |
Hi @Pawel-Widawski ,
I think you can try to create a calculated column to the max processed stuff in each 1 hour period.
MaxHour =
CALCULATE (
MAX ( 'Table'[processed stuff] ),
FILTER (
'Table',
'Table'[Date] = EARLIER ( 'Table'[Date] )
&& HOUR ( 'Table'[Operation's Time Blocks] )
= HOUR ( EARLIER ( 'Table'[Operation's Time Blocks] ) )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
I'm trying to do something similar using this solution but I'm getting an error:
Measure =
CALCULATE(
MAX(TimeDim[Minute]) - MIN(TimeDim[Minute]),
MINX(
FILTER(
TimeDim,
TimeDim[Hour] = Min(TimeDim[Hour])),
TimeDim[Minute]
)
)
Error: The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
Any ideas what I'm doing wrong? I am trying to calculate the difference in time between the max time and the min in each hour interval.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |