Calculating resistor divider ratio with load resistor value input and output voltage given
It would appear you have made an incorrect assumption that the current does not change when the variable resistor is changed.

So, we can divide the variable resistor into R1 and R2 such that R1 + R2 = R, then assign current I to the wire adjecent to VIN and RTOTAL = R1 + (R2 || RL).

v = r * i
27 = RTOTAL * I
8 = R2 || RL * I
27/RTOTAL = 8/(R2 || RL)
27/8 = RTOTAL/(R2 || RL)
27/8 = (R1 + (R2 || RL))/(R2 || RL)
27/8 - 1 = R1/(R2 || RL)
2.375 = R1/((1000000 - R1) || 1000000)
2.375 = R1/(1/(1/(1000000 - R1) + 1/1000000)))
R1 = 635032
R2 = 1000000 - 635032
R2 = 364968


Or ~36% of the original 100% setting