Method in LookML to calculate period over period trend calculation

Hi All,

Please find below my requirement which should create a dynamic filter on top of a existing view.

We already have one view on top of a table which has a booking date and revenue columns.

We want to add dynamic filters which will compared any quarter/month/year selection and compare with previous same time range.

e.g. There would be toggle field which shall contain MTD,QTD and YTD.

If the user selects QTD and in another field inputs 2022 and Q2, the looker shall compare 2022-Q2 revenue and 2021-Q2 revenue.

If the user selects MTD and inputs 2023 Aug, then the looker shall compare 2023 (From 1st August'23 to 24th Aug'23)

as against 2022(From 1st August'22 to 24th Aug'22)

The same applies for YTD also. If 2023 is selected,it shall compare 1st jan'23 to 24th aug'23 with the same period last year.

Same applies for any year which users can enter to see mtd qtd yrd comparison.

Thanks a lot.

 

0 0 110
0 REPLIES 0
Top Labels in this Space
Top Solution Authors