If your question is achive the 2nd table format in Qlikview then here is one of the solution.
Have Dimensions as: Produit, Centre, Stock
Have 4 Expressions for each City: Sum([City A]), Sum([City B]), Sum([City C]), Sum([City D])
You can achive this by Pivot Table.
If your questions is more about loading then scirpt in different way, then it has to be handled at the LOAD Script level. Using TRANPORSE option.