I am new to Looker. I have Aggregate Table to analyze sales metrics Period over Period

I need help on Looker Explore to explore the Sales Amount when user try to filter a date range for last one week. So the Tabulation report, need show data Sales Date, Sales Amount and Last Year Same period  Sales Amount. My aggregate table in Bigquery having data in a grain like trans date, item and sales amount. Looker needs to query  Current Date Filter range Sales amount and last year same period sales amount. Thanks in advance

 Say Agg Table data has data

DateItemSales Amount
1/11/2023Icecream$2
1/12/2023dougnut$10
1/11/2024chocolate$5
1/12/2024Icecream$20

Looker Date Filter - 1/11/2024 to 1/12/2024 and explore output as 

DateItemSales AmountLast Year Sales Amount
1/11/2024Icecream $2
1/11/2024Chocolate$5 
1/12/2024Icecream$20 
1/12/2024dougnut $10

 

 

 

 

0 2 184
2 REPLIES 2

If you pivot your explore on 'Date-year', you would get a column for each year of sales as you can see below:

GavinW_0-1732638031006.png

Just filter your date field for the years you are interested in. You can pivot on a field by clicking this button:

GavinW_1-1732638175746.png

If 'year' is not available in your date field, you can ask your data team to make it available on the front end.

I dont want to do Pivot. I will have two measures current_year_sales and last_year_sales. when the date filter say 01/01/2024 to 06/01/204. Then I need to bring data for current_year_sales for the date filter and last_year_sales from the same period last year

Top Labels in this Space
Top Solution Authors