Thanks for query,
You have not mentioned your age.If you are elderly then chances of having lumbo sacral spondilitis or degenerative changes in your spinal cord
giving sciatic pain and if lower lumber or sacrum
is affected you may have problem of ED.
Go for blood sugar as Ed may be due to diabetes
Go for X ray
lumbo sacral region.
Consult orthopedic and seek advice,
Ok and bye.