To understand why an ingredient is not included in the cost analysis and to fix it, you need to display the Costing tab of the recipe and check the color of the ingredient:
Red: the ingredient is not linked to the database of grocery items. You need either to link it with an existing item, or to add it to the database.
Blue: the software doesn't know the unit of measure used for this ingredient (it can be either the unit of measure used in the recipe or in the costing information). You need to add it to the software and specify its weight.
Green: the software does not know the cost of the ingredient.
In any of these cases, you can fix the problem by clicking on the magic wand button next to the ingredient and adding the required information.
For more information, I recommend you also to watch the following tutorial: