I'm going to disagree with the other answer and say that your usage is slightly off.
Here's why: you don't need the "the" before "wheat flour"
Either you need some wheat flour, and you happened to buy 20kg a few days ago, in which case you could say either:
I need wheat flour, of which I bought 20 kg. two days ago.
I need wheat flour, 20 kg. of which I bought two days ago.
The other situation is you need the exact amount you bought the other day (with most people inferring that you bought it for this specific purpose). In that case, you could say either:
I need the wheat flour which I bought 20 kg. of two days ago.
I need the 20 kg of wheat flour which I bought two days ago.