Hi, below is my data tables I have.
table1:
sku_id | dateval | sales_data |
---|---|---|
ab124 | 20210603 | 10 |
ab124 | 20210502 | 20 |
ab123 | 20210606 | 30 |
table2:
date_val | yr_num | yr_wk_num | day_wk_num | yr_wk_nm | day | mo_num |
---|---|---|---|---|---|---|
20200808 | 2020 | 32 | 6 | 202032 | Saturday | 08 |
20200809 | 2020 | 32 | 7 | 202032 | Sunday | 08 |
20200810 | 2020 | 33 | 1 | 202033 | Monday | 08 |
20200811 | 2020 | 33 | 2 | 202033 | Tuesday | 08 |
20200812 | 2020 | 33 | 3 | 202033 | Wednesday | 08 |
I need to take week number from table 2 comparing dateval from table1 and date_val in table 2 and do the below scenarios in looker.
1. Rolling avg for 6 months weekly
2. Same week prior year sales
Am new to looker. please suggest me how to achieve these scenarios in looker (LExp or view).