This won't work very well, potentiometers are rarely a good solution for changing the brightness of an LED.
It can work, but not if the load is variable, which is is in this case. When you turn more LEDs on, the current
over the resistor will increase, causing the voltage over the resistor to increase and the voltage over the LEDs to drop. So you'll end up potentially burning the first LED you turn on and with a much lower voltage/current over when you have all of them on. TO make it work you need 18 potentiometers.
Let's do an example:
input voltage is 3.7 volts, string is made of a total of 100 20mA LEDs, each expecting 3.2 volts.
If the LEDs gets 3.2 volts, the whole things draws 100 * 0.020 = 2Amps. We need the resistor to drop 3.7-3.2 = 0.5 volts. Ohms law says V=IR, so 0.5 = 2 * R => R = 0.25 ohms
Now, let's see what happens if we only have one segment on:
Let's assume the LEDs get their full current: 2/6 = ~0.33 amps. V=IR => V = V=0.25 * 0.33 => V = 0.08
So the LED now gets 3.7 - 0.08 = 3.62 volts, which very likely equals a fried LED.