Forum Discussion
Multiply Quantity in one table by Price in another table
- 5 years ago
Hi Anonymous
Download sample PBIX file with the following data/tables
Can you please show what you mean by the amounts don't aggregate correctly?
I've set up a DateTabe and 2 tables as you described above: Quantity and Price.
With a relationship from the DateTabe to the others, everything works as it should in my model.
I'm using this measure to calculate Qty * Price.
Tot Price := SELECTEDVALUE('Quantity'[Qty]) * SELECTEDVALUE('Price'[Price])BTW - you don't need to show the date hierarchy unless you need to. Change it to just show the date
Regards
Phil
Hi,
I would have implemented your own suggestion of bringing in the price to the quantity table via the LOOKUPVALUE() function. Then write a SUMX() measure to get the result in your visual. Be careful to drag the Date/Year/Month from the Calendar Table.
Hope this helps.