Selecting products for different manufacturing units

today, I have two product : Product A & Product B
There are two factory produce Product A : Factory A1, Factory A 2…and so on
Otherwise, Factory1 has its own data like data A1,data A2…and so on
the same situation on B.

now , the question is that —>

When I choose Product A , the factory type FA1 & FA2 of Product A will show in list 2
and the data information will show in list 3

how can I do for that ?
dynamic or other fuction?

is this in report or where if so u have to play with aggregation

google : spinning rows into columns.