You've discovered why volume is an unreliable way to measure espresso beverage quantity.
There are two reasons for this:
1. The crema increases the measured volume, just like soap bubbles floating on top of bath water. The espresso bubbles that form the crema are inflated with CO2 that's trapped in the grounds and released by hot water.
2. The amount of coffee solids that wind up in the cup varies depending on the coffee, grind, dose, temperature, pressure and shot time. You can pull two shots of equal volume, but if any of those parameters varies the dissolved solids may vary, which in turn can have substantial impact on the flavor.
As Andy's chart suggests, you should start by choosing the desired brew ratio. This is the ratio of ground coffee weight to beverage weight, and it defines the strength (concentration) of the beverage. A 1:2 ratio (say, 16g of coffee to 32g of beverage) is a Normale, or average strength. A 1:1 ratio, or a Ristretto, will be very strong. A 1:3 ratio, or Lungo, will be weaker.
The first time you dial in a coffee, weigh the grounds before brewing and weigh the shot as you pull it (put the scale under the cup.) Stop the shot when you get to the target beverage weight. This should happen in roughly 25-35 seconds. If it takes less time, try grinding finer. If it takes more time, try grinding coarser. The end of the shot should also correspond to when the stream blonds (gets significantly lighter). This indicates that extraction is complete. The idea is to adjust the grind until all three things come together: the stream blonding, the target beverage weight being reached, and the time being in the 25-35 second range.
Once you get familiar with doing this, you can play around with longer and shorter shot times, different brew ratios, etc.