Forum Discussion
VBA Code to Assemble data horizontaly
Riny_van_Eekelen The logic whihc i used is First Stop and First Movingwhich ever is closest
Example : Stop 12:30:00
Moving 12:31:00
Moving 12:32:00
Moving 12:35:00
We select the first Moving 12:31:00. if Location- System- Equipment match.
I have attached example.
1st Tab list- Events history with Filters thats the filter i use.
2nd Tab- Result which needs to be in this pattern.
There will be events which wont have both the events in that case we need to remove it. This were i am struggling in Power Query.
Jeev125 Changed the approach altogether and didn't try to replicate your output. See if the attached PQ solution contains the logic you are after. Checked several events against the raw data. Seems to work OK, but you need to assure this yourself.
- Jeev125Sep 03, 2020Copper Contributor
Used your solution but when you use fill option some instance it copies date and time from other reference which is not matching to actual data. Now i need to get First occurrence and last occurrence of the same event to get exact match. Considering the logic Alarm as start & Normal as Finish. Any idea on that ?
- Jeev125Sep 03, 2020Copper Contributor
Also i tried using List.Max or List.First Function but i think it only take max or min values for the largest or smallest value. Somehow i must be able to match Alarm time for that particular day location time to next Normal Date & time event only.