Forum Discussion
Relating Table dataset to a Matrix to perform calculations
- Anonymous4 years ago
HI
Create a measure say ProdCount=count(Product) with its name so for ex for Cake- 2 and so on.
Then just mulitiply it like ProdCount* No of Ingredients required say for Cake it has to be
2* 2 (Flour) and so on, looks like its simple maths.
Check with simple aggregate function Count
- 4 years ago
This measure should work as well:
zFlour = SUMX('Project', RELATED('Product'[Flour]))
Hi did not understand why woudl you need 4 Floor and 2 Eggs for Cackes, can you please elaborate what youyr excel contains ?
Our table is a list of all the "orders" we have to purchase ingredients for. So in the first table, we have 2 cake orders.
Our matrix tells us: For each cake, we need 2 flour, 1 egg, and 1 vanilla.
My Excel data is a workbook with 3 sheets:
- The Table of our orders
- Our ingredient matrix
- Quantities of ingredients to order
So if we need to buy ingredients for our 2 cake orders, we would need 4 flour, 2 eggs, and 1 vanilla.
- grantsamborn4 years ago
Solution Sage
This measure should work as well:
zFlour = SUMX('Project', RELATED('Product'[Flour]))