Header 1 | Header 2 | Header 3 | Header 4 | Header 5 |
---|
product | weeks | data_details | month | sales |
A | 1 | 345 | jan | 234 |
B | 1 | 345 | jan | 343 |
A | 2 | | jan | 334 |
B | 2 | | jan | 243 |
A | 3 | | feb | 654 |
B | 3 | | feb | 234 |
A | 4 | | feb | 324 |
B | 4 | | feb | 45 |
A | 5 | | mar | 45 |
B | 5 | | mar | 56 |
A | 6 | | mar | 67 |
B | 6 | | mar | 456 |
i have this table,in which for product A and B we have data_details of 1st week ,
for second week my calculation will be data_details(1st week)-sales(1st week)
for third week my calculation will be data_details(2nd week)-sales(2ndweek)
and same for all next
if i select product A and week 4 then it should give data_details calculated from 3rd weeks data ?how can i do it ?help me out