Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
When performing a filter and selecting the dates 06/14/2021 and 6/15/2021, I need to add the interval between the start time and end time of the two dates.
Putting it another way:
maximum hours (06/14/2021) - minimum hours (06/14/2021)
+
maximum time (06/15/2021) - minimum time (06/15/2021)
= ?
The objective is to obtain the production time per day and accumulated when more than one date is filtered.
Solved! Go to Solution.
Hi @Rpoucas
Try this measure:
Production Time =
VAR _A =
ADDCOLUMNS (
SUMMARIZE (
'Table',
'Table'[DATE],
"Start", MIN ( 'Table'[START_PROCESS] ),
"End", MAX ( 'Table'[END_PROCESS] )
),
"Production time", [End] - [Start]
)
RETURN
SUMX ( _A, [Production time] )Output:
Download File: https://gofile.io/d/qJ1w3w
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
@VahidDM Thanks for your help
| DATE | PROCESS_NUMBER | START_PROCESS | END_PROCESS | AMOUNT_PRODUCED |
| 14/6/2021 | 1 | 08:00:00 | 08:50:00 | 200 |
| 14/6/2021 | 2 | 09:00:00 | 09:50:00 | 300 |
| 14/6/2021 | 3 | 10:00:00 | 10:50:00 | 250 |
| 14/6/2021 | 4 | 11:00:00 | 11:50:00 | 300 |
| 14/6/2021 | 5 | 12:00:00 | 12:50:00 | 200 |
| 15/6/2021 | 1 | 08:10:00 | 08:50:00 | 250 |
| 15/6/2021 | 2 | 09:00:00 | 09:50:00 | 300 |
| 15/6/2021 | 3 | 10:00:00 | 10:50:00 | 200 |
| 15/6/2021 | 4 | 11:00:00 | 11:50:00 | 250 |
| 15/6/2021 | 5 | 12:00:00 | 12:55:00 | 300 |
Hi @Rpoucas
Try this measure:
Production Time =
VAR _A =
ADDCOLUMNS (
SUMMARIZE (
'Table',
'Table'[DATE],
"Start", MIN ( 'Table'[START_PROCESS] ),
"End", MAX ( 'Table'[END_PROCESS] )
),
"Production time", [End] - [Start]
)
RETURN
SUMX ( _A, [Production time] )Output:
Download File: https://gofile.io/d/qJ1w3w
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
@Rpoucas are you able to show the desired output for the above data that would follow the logic below
maximum hours (06/14/2021) - minimum hours (06/14/2021)
+
maximum time (06/15/2021) - minimum time (06/15/2021)
= ?
HI @Rpoucas
Can you share a sample of your data in the table format to be able to copy and past that?
Appreciate your Kudos!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |