Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
N/A
Can anyone help me out with this problem? Like i said. The first idea is not bad but it doesnt quite work or I made a mistake
Thank you, this is a great starting point. I followed your steps but for some reason the Fault Durations are not being added up. For example the first two Faults are within the same time frame. So the first faultduration should read 1696 as it is 1696 seconds long. The second FaultDuration should also read 1696 since that fault is in the time frame of the first and wont add to the total. why does it only show 5? unlike in your example.
Hi @Zneta ,
Here are the steps you can follow:
1. Create calculated column.
Date =
DATE(YEAR('Table'[Fault start]),MONTH('Table'[Fault start]),DAY('Table'[Fault start]))
Minute =
var _mindate=
MINX(FILTER(ALL('Table'),'Table'[Date]=EARLIER('Table'[Date])),[Fault start])
var _maxdate=
MAXX(FILTER(ALL('Table'),'Table'[Date]=EARLIER('Table'[Date])),[Fault end])
return
DATEDIFF(
_mindate,_maxdate,MINUTE)
2. Create measure.
Measure =
var _mindate=MAX('Table'[Date]) + TIME(0,0,0)
var _maxdate=_mindate +1
var _oneday=
DATEDIFF(
_mindate,_maxdate,MINUTE)
return
_oneday - MAX('Table'[Minute])
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
84 | |
76 | |
65 |
User | Count |
---|---|
145 | |
109 | |
109 | |
102 | |
96 |