Forum Discussion
stefanycheck
8 years agoFrequent Visitor
Count everytime a status change
Hi! I have this data bellow where "sentido" is the column of status. And "despejando produto"(let's call it status 1) and "mechendo produto" (let's call it status 2) are the two possible status. ...
- 8 years ago
Try this calculated column
EarliestIndex = VAR Temp = CALCULATE ( MAX ( [Index] ), FILTER ( Table1, [Index] < EARLIER ( [Index] ) && [STATUS] <> EARLIER ( [STATUS] ) ) ) VAR Temp1 = CALCULATE ( MIN ( [Index] ), FILTER ( Table1, [Index] > EARLIER ( [Index] ) && [STATUS] <> EARLIER ( [STATUS] ) ) ) RETURN IF ( [Index] > temp && OR ( [Index] < temp1, ISBLANK ( temp1 ) ), temp + 1, 0 )Then put the distinct count of this column along with the STATUS in a TABLE visual
stefanycheck
8 years agoFrequent Visitor
Zubair_Muhammad if it isn't too much, could you also tell me how I can show this status along time? I have a column with data and time for each time this status appeared. There is a way that I can show like dots in each time with each status??
Zubair_Muhammad
8 years agoCommunity Champion
- stefanycheck8 years agoFrequent Visitor
Actually, I could figure it out. But now, I want to make two columns, one with the date and time a status started and one with the date and time it ends. For example, now, my table looks like this:
Date Status EarliestIndex index 8/8/18 14:00 Status 1 0 0 8/8/18 14:01 Status 1 1 1 8/8/18 14:02 Status 1 1 2 8/8/18 14:03 Status 1 1 3 8/8/18 14:04 Status 1 1 4 8/8/18 14:05 Status 2 5 5 8/8/18 14:06 Status 2 5 6 8/8/18 14:07 Status 2 5 7 8/8/18 14:08 Status 1 8 8 8/8/18 14:09 Status 1 8 9 8/8/18 14:10 Status 1 8 10 8/8/18 14:11 Status 1 8 11 8/8/18 14:12 Status 2 12 12 8/8/18 14:13 Status 2 12 13 8/8/18 14:14 Status 2 12 14 8/8/18 14:15 Status 2 12 15 8/8/18 14:16 Status 1 16 16 8/8/18 14:17 Status 1 16 17 8/8/18 14:18 Status 1 16 18 8/8/18 14:19 Status 1 16 19 And I want it to look like this:
Date Status EarliestIndex index Starts Ends 8/8/18 14:00 Status 1 1 0 8/8/18 14:00 8/8/18 14:04 8/8/18 14:01 Status 1 1 1 8/8/18 14:00 8/8/18 14:04 8/8/18 14:02 Status 1 1 2 8/8/18 14:00 8/8/18 14:04 8/8/18 14:03 Status 1 1 3 8/8/18 14:00 8/8/18 14:04 8/8/18 14:04 Status 1 1 4 8/8/18 14:00 8/8/18 14:04 8/8/18 14:05 Status 2 6 5 8/8/18 14:05 8/8/18 14:07 8/8/18 14:06 Status 2 6 6 8/8/18 14:05 8/8/18 14:07 8/8/18 14:07 Status 2 6 7 8/8/18 14:05 8/8/18 14:07 8/8/18 14:08 Status 1 9 8 8/8/18 14:08 8/8/18 14:11 8/8/18 14:09 Status 1 9 9 8/8/18 14:08 8/8/18 14:11 8/8/18 14:10 Status 1 9 10 8/8/18 14:08 8/8/18 14:11 8/8/18 14:11 Status 1 9 11 8/8/18 14:08 8/8/18 14:11 8/8/18 14:12 Status 2 13 12 8/8/18 14:12 8/8/18 14:15 8/8/18 14:13 Status 2 13 13 8/8/18 14:12 8/8/18 14:15 8/8/18 14:14 Status 2 13 14 8/8/18 14:12 8/8/18 14:15 8/8/18 14:15 Status 2 13 15 8/8/18 14:12 8/8/18 14:15 8/8/18 14:16 Status 1 17 16 8/8/18 14:16 8/8/18 14:19 8/8/18 14:17 Status 1 17 17 8/8/18 14:16 8/8/18 14:19 8/8/18 14:18 Status 1 17 18 8/8/18 14:16 8/8/18 14:19 8/8/18 14:19 Status 1 17 19 8/8/18 14:16 8/8/18 14:19 So I can make some kind of report with it, showing the time each change on status began and each time it ended.