I want to create a calculation that shows me the % Week over Week vs the prior week in [Country] using functions.
(B-A/A)*100
Maybe using offset_list help? Thanks in advance!
Week over Week vs the prior week in Country
Using order_items.count
as an example of a kpi we want to report on, for a single value visualization vs. the week before we can use a simple offset function:
offset(${order_items.count},1)
Then use Looker’s built-in comparison option in the viz settings:

If we want to plot this over time then we can do something like:
(${order_items.count} - offset(${order_items.count},1))
/
${order_items.count}
which we can then plot on a chart, even adding a pivot on country if we want:

Hope that helps!
Thanks! This was helpful.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.