08-30-2020 11:20 PM
08-30-2020 11:20 PM
Need help in Developing a vba code. I tried Power Query but could Pivot or Group using multiple filters.
Can somebody create a logic to compare data vertical to horizontal. I have attached my Excel for reference.
Raw Data Is the CVS Dump.
I want to assemble to Sample File.
I tried First and last event Vlookup, but i get results in different lines. Power Query i couldn't find a function which assemble like the sample data (which is the output file i need). Need help in resolving this issue. The current match up is purely done manually.
Filter required while setting up the raw data.
Column F: Fault (Only include Moving Status)
Column G: Fault Type 1 (Stopped & moving) is the filter criteria.
08-31-2020 04:53 AM
Hi Riny, i tried this solution before but my data has some notification without failure. what i am trying to match is if Date & Time-Location-System-Equipment with moving status is STOPPED then same event should come with different time but with Moving.
My data is through a system generated so i have no control, I have attached Quarterly raw data wherein i have 3075 line with moving status Stopped and 3196 Moving. i want to match stop lines with moving and remove unmatched.
08-31-2020 03:40 PM
@Riny_van_Eekelen The logic whihc i used is First Stop and First Movingwhich ever is closest
Example : Stop 12:30: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.
09-01-2020 12:40 AM
@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.
09-02-2020 05:03 PM
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 ?
09-02-2020 06:49 PM
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.