The aggregation, arrangement and bonding together of a set of components to form NAD(P)H dehydrogenase complex, which is involved in electron transport from an unidentified electron donor, possibly NAD(P)H or ferredoxin(Fd) to the plastoquinone pool.