Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a table which holds data for every part that is produced. When a part is produced, it has a date time stamp (see below):
I have then easily created a visual which shows me the earliest and latest time a part was produced, see below:
How can I calculate the minutes between the earliest and latest shot datetime?
Solved! Go to Solution.
Hi @rebrow31 ,
I think you can try DATEDIFF function in your code.
Calculated column:
Column =
VAR _SECOND = DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND)
RETURN
DIVIDE(_SECOND,60)
Measure:
Measure =
VAR _Summarize = SUMMARIZE('Table','Table'[Earliest DateTime],'Table'[Latest DateTime],"Minute", DIVIDE(DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND),60))
RETURN
SUMX(_Summarize,[Minute])
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 @rebrow31 ,
I think you can try DATEDIFF function in your code.
Calculated column:
Column =
VAR _SECOND = DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND)
RETURN
DIVIDE(_SECOND,60)
Measure:
Measure =
VAR _Summarize = SUMMARIZE('Table','Table'[Earliest DateTime],'Table'[Latest DateTime],"Minute", DIVIDE(DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND),60))
RETURN
SUMX(_Summarize,[Minute])
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.
([Latest DateTime]-[Earliest DateTime])*1440
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |