I need help with an app that works with orders for my online book shop.
I have a table “Books” with “BookName”, “Price” for each book.
I also have a table “Sales” where all orders are created. If several books are ordered,
I use an expression that calculates the total for the order:
SUM(SELECT(Books[Price], IN([BookName], [_THISROW].[BookName])))
This works only if each book is ordered once. But I have orders where clients order different amounts of books, for instance, they can order two books of one kind, and just one other book. How would the expression look like in this case? Where do I use “Quantity”?