Hi Khalid,
In your scenario,
It looks like you have detailed table and summary table, however there is one column that makes the detail table as detail for example:
summary Table = ST , Detail Table = DT
ST
Prd_Id total cost
1234 $150
DT
Prod_ID pro_Detail Cost_per_D_Prod
1234 Pro_1 $100
1234 Pro_2 $50
This is I suppose your structure in this case it's either when you join the 2 tables don't bring the column that gives details just bring all other columns and you should be fine,
if you have to have the details about product you will need to create another aggregation where you use the detail_Pro and give it different name than the other measure.
hope this answer your question.