The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I trying to Calculate the duration of a failure I get from the database various columns I have already tried several things with variable and with earliest but without result I would like to see the total time how long the input is high
input Data
messages_ndx t_stamp Yellow_L38 Yellow_L29a Yellow_L07 1850682 21-10-2019 12:19:41 0 1 0 1850683 21-10-2019 12:20:04 0 1 1 1850684 21-10-2019 12:21:07 1 1 1 1850685 21-10-2019 12:22:05 1 1 0 1850686 21-10-2019 12:22:30 1 0 0 1850687 21-10-2019 12:22:39 0 0 0 1850688 21-10-2019 12:22:43 0 0 1 1850689 21-10-2019 12:22:48 1 0 1 1850690 21-10-2019 12:23:04 1 0 0 1850691 21-10-2019 12:23:38 1 1 0 1850692 21-10-2019 12:23:59 0 1 0 1850693 21-10-2019 12:24:00 0 0 0
result
messages_ndx Kolumn name Fault time 1850682 Yellow_L29a 00:02:49 1850683 Yellow_L07 00:02:01 1850684 Yellow_L38 00:01:32 1850688 Yellow_L07 00:00:21 1850689 Yellow_L38 00:01:11 1850691 Yellow_L29a 00:00:22
Hallo Jimmy I'm glad you want to help me with this
the T-stamp column is generated when an event occurs
I'll try to explain it:
column:
Yellow_L38
Yellow_L29a
Yellow_L07 are failure messages
as you can see:
row 1 generated because Yellow_L29a goes from 0 to 1
row 2: Yellow_L07 goes from 0 to 1
row 3: Yellow_L38 goes from 0 to 1
row 4: Yellow_L07 goes from 1 to 0
now I would like to know the time that the input from Column Yellow_L38 , Yellow_L29a, Yellow_L07 was high.
result:
row 4: Yellow_L07 (from 1 to 0) with timestamp 21-10-2019 12:22:05 minus
row 2: Yellow_L07 (from 0 to 1) with timestamp 21-10-2019 12:20:04 = 00:02:01
similarly for the column Yellow_L29a
row 5: Yellow_L29a with timestamp 21-10-2019 12:22:30 minus
row 1: Yellow_L29a with timestamp 21-10-2019 12:19:41 = 00:02:49
and so on
I hope I have explained it a bit well for you.