Question About Variable Costing

I'm confused. Under variable costing, the variable selling, general, and administrative expenses are part of the total variable costs for the contribution margin calculation. However, these costs are not included when valuing inventory? Is this correct? I was thinking that they were included in inventory valuation because these costs are included in calculating contribution margin. But maybe not..can someone clear this up for me?