(Influence of other ideologies)-(Influence of your ideology). Each point of influence brings your public opinion down to the next level, with revolutionary wave occurring at 4 points.
Let's say that you went Order. Civ A went Freedom and has 2 points of influence on you, Civ B went Order and has 1 point of influence on you, and Civ C went Autocracy and has 1 point of influence on you. A and C combine to pressure you to change from Order for 3 points, but B is helping raise the opinion of Order, decreasing that number to 2. So you are at the second level of unhappiness (I believe it's Civil Resistance but don't quote me on that) and, because Civ A has more influence on you than Civ C, your people will prefer that you pick Freedom.