Mantrahalos
New Member
- Joined
- Jul 20, 2021
- Messages
- 2
- Office Version
- 365
Hi Mr Excel - I hope someone can help. The data below shows two tables I have in powerbi. (X and Y)
I am trying to create a column in a table (column J in the data below) - I am trying to calculate a total sales for a particular week - The cost of each item changes from week to week.
So - If in week 1 we sell 3 of widget 3 then i want to calculate 9 times the cost of widget 3 (at the week 1 price) - I have a seperate table (Table X in data below) that shows the cost of each item by each week. I cant see a way to add a relationship as neither columns have unique values.
Can anyone assist? Have I given enough information for what I am trying to achieve?
Thanks.
Mantrahalos
I am trying to create a column in a table (column J in the data below) - I am trying to calculate a total sales for a particular week - The cost of each item changes from week to week.
So - If in week 1 we sell 3 of widget 3 then i want to calculate 9 times the cost of widget 3 (at the week 1 price) - I have a seperate table (Table X in data below) that shows the cost of each item by each week. I cant see a way to add a relationship as neither columns have unique values.
Can anyone assist? Have I given enough information for what I am trying to achieve?
Thanks.
Mantrahalos
A | B | C | D | E | F | G | H | I | J | K | |
Table X | Table Y | ||||||||||
Week | Average cost table | Item | Week | date | Store code | sales quantity | Item | Expect to see | total sales this week | ||
Week1 | 35 | Item3 | Week1 | 01/01/2019 | 1 | 3 | Item3 | 105 | 3*item3@week1price in tableX | ||
week2 | 65 | Item3 | week1 | 08/01/2019 | 2 | 4 | Item3 | 260 | |||
week1 | 32 | item4 | week3 | 15/01/2019 | 3 | 56 | item4 | 1064 | |||
week4 | 19 | item3 | week1 | 22/01/2019 | 4 | 3 | item3 | ||||
week4 | 525 | item1 | Week5 | 29/01/2019 | 4 | 4 | item1 | ||||
Week6 | 52 | item1 | Week6 | 05/02/2019 | 1 | 53 | item1 | ||||
Week7 | 85 | item6 | week4 | 12/02/2019 | 2 | 85 | item6 | ||||
Week8 | 96 | item1 | week4 | 19/02/2019 | 3 | 5 | item1 | ||||
Week9 | 841 | Item3 | Week9 | 26/02/2019 | 4 | 6 | Item3 | ||||
Week10 | 32 | Item3 | week9 | 05/03/2019 | 3 | 7 | Item3 | ||||
Week11 | 23 | item4 | Week11 | 12/03/2019 | 2 | 89 | item4 | ||||
Week12 | 132 | item3 | Week12 | 19/03/2019 | 5 | 976 | item3 | ||||
Week13 | 32 | item1 | Week13 | 26/03/2019 | 4 | 5 | item1 | ||||
Week14 | 63 | item1 | Week14 | 02/04/2019 | 3 | 8 | item1 | ||||
Week15 | 32 | item6 | Week15 | 09/04/2019 | 5 | 3 | item6 | ||||
Week16 | 12 | item1 | Week16 | 16/04/2019 | 3 | 55 | item1 | ||||
Week17 | 3 | Item3 | Week17 | 23/04/2019 | 2 | 6 | Item3 | ||||
Week18 | 113 | Item3 | Week18 | 30/04/2019 | 3 | 77 | Item3 | ||||
Week19 | 21 | item4 | Week19 | 07/05/2019 | 84 | item4 | |||||
Week20 | 21 | item3 | Week20 | 14/05/2019 | 46 | item3 |