How to create widget of progress bar with information taken from variants

To be more precise, I would like to change for example material of the flooring or type of windows with variants and than take information as numerical data from those objects and connect it to proggress bar.
So depending on the material or object choosen amang variants numbers will change and information represented in the widget will change as well