QUERY : There should not be 2 consecutive "YES". If so, then the 2nd "YES" should be replaced with "NO". Please find below the sample Input data and desired Output, to be achieved using POWER QUERY.[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]INPUT[/TD]
[TD]OUTPUT[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]NO[/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD]INPUT[/TD]
[TD]OUTPUT[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]NO[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]YES[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]NO[/TD]
[/TR]
</tbody>[/TABLE]