Delete row if column matches

Hi, I have a long file in the format below. I want to delete the consecutive lines that contain the same value in column 1.
I have tried awk '!x[$1]++' FS="," filename
This has not worked.

14,MM709_BHP_DM,BHP,BHP_MC709_DM	
19,OFFLINE,CHE,CHEV_MC773_DM	 
20,M33,BP,BP_MIM775_NS_DM	
20,M84,BP,BP_MIM775_NS_DM
20,MM709_BHP_DM,BHP,BHP_MC709_DM	
24,OFFLINE,BP,BP_MC775_EW_DM

I want my output to be:

14,MM709_BHP_DM,BHP,BHP_MC709_DM	
19,OFFLINE,CHE,CHEV_MC773_DM	 
20,M33,BP,BP_MIM775_NS_DM	
24,OFFLINE,BP,BP_MC775_EW_DM

Try

$ cat tmp
14,MM709_BHP_DM,BHP,BHP_MC709_DM
19,OFFLINE,CHE,CHEV_MC773_DM
20,M33,BP,BP_MIM775_NS_DM
20,M84,BP,BP_MIM775_NS_DM
20,MM709_BHP_DM,BHP,BHP_MC709_DM
24,OFFLINE,BP,BP_MC775_EW_DM


$ awk -F, '$1!=b{b=$1;print}' tmp
14,MM709_BHP_DM,BHP,BHP_MC709_DM
19,OFFLINE,CHE,CHEV_MC773_DM
20,M33,BP,BP_MIM775_NS_DM
24,OFFLINE,BP,BP_MC775_EW_DM

For your sample input, your script seems to work just fine. Does it not work for you with that sample input?

What operating system and shell are you using?

To produce output for different input still meeting the output you say you want, you might try:

awk -F, 'x!=$1;{x=$1}' filename