Forum Discussion
Copy previous row value including IF statement
The Start and End Date is collected from a different column containing a key of date and time.
To be able to use the data later for the Gantt chart I need a different start and end column linked by an ID (here Drive_ID).
I'm not sure if I understand your answer. Here you can find some sample data:
| Timestamp | Movement Flag |
| 23.03.2018 09:41:25 | 0 |
| 23.03.2018 09:41:26 | 0 |
| 23.03.2018 09:41:27 | 0 |
| 23.03.2018 09:41:28 | 0 |
| 23.03.2018 09:41:29 | 0 |
| 23.03.2018 09:41:30 | 0 |
| 23.03.2018 09:41:31 | 1 |
| 23.03.2018 09:41:32 | 1 |
| 23.03.2018 09:41:33 | 1 |
| 23.03.2018 09:41:34 | 1 |
| 23.03.2018 09:41:35 | 1 |
| 23.03.2018 09:41:36 | 1 |
| 23.03.2018 09:41:37 | 1 |
| 23.03.2018 09:41:38 | 1 |
| 23.03.2018 09:41:39 | 1 |
| 23.03.2018 09:41:40 | 0 |
| 23.03.2018 09:41:41 | 0 |
| 23.03.2018 09:41:42 | 0 |
| 23.03.2018 09:41:43 | 1 |
| 23.03.2018 09:41:44 | 1 |
I'm happy to have a go at it. But I'm not clear what your starting position is. You have provided an image with seemingly a before and after image, and also some sample data. The "before" image and the sample data are different. If you can provide some exact sample data, preferably with at least 3 complete events I will take a look (ideally in a table in Excel (Maybe linked via Dropbox or similar)
- fishboneox8 years agoFrequent Visitor
MattAllington: Thanks for your help!!
Attached you'll find the link with a CSV File. This represents my starting point.
As mentioned above I would like to generate the event start every time a array of several 1 starts and the event "end" every time this array stops. Currently the problem isn't the creation of this event but to connect these events creating one unique ID per array (any kind of number of unique text) for example:
Using this unique ID I want to be able to group the data.
I hope this time I was able to describe the problem. Since I'm relatively new to PowerBI I would appreciate some step by step explanation