Forum Discussion
Stock and sales join
- 7 years ago
Hi gkalandadze ,
At first, rename “Quantity” column to “Quantity2” in the “Sales” table and crossjoin these two tables.
temp = CROSSJOIN ( Recipes, Sales )
Create a new calculated column to count total amount.
total amount = IF ( temp[Name] = temp[Item], temp[Quantity] * temp[Quantity2], 0 )
Then create a new table to retain fields necessary.
Final table = SELECTCOLUMNS ( 'temp', "Ingredient", 'temp'[Ingredient], "Date", 'temp'[Date], "Column", 'temp'[total amount] )Now, you can use matrix visual to display it.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi gkalandadze ,
At first, rename “Quantity” column to “Quantity2” in the “Sales” table and crossjoin these two tables.
temp = CROSSJOIN ( Recipes, Sales )
Create a new calculated column to count total amount.
total amount = IF ( temp[Name] = temp[Item], temp[Quantity] * temp[Quantity2], 0 )
Then create a new table to retain fields necessary.
Final table =
SELECTCOLUMNS (
'temp',
"Ingredient", 'temp'[Ingredient],
"Date", 'temp'[Date],
"Column", 'temp'[total amount]
)
Now, you can use matrix visual to display it.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Mate. It works