Hello Team,
I am working with a dataset that includes a date field (for example, Order_Date) and business metrics such as Sales.
Sample scenario:
-
Order_Date:
2023-01,2023-02,2023-03,2024-01 -
Metric: Sales Amount
Use case:
I want to compare the current period’s value with a previous or next period, such as:
-
Current month sales vs previous month sales
-
Current month sales vs same month in the previous year
I understand that Lag and Lead (Leap) functions can be used for such period-based comparisons, but I would like clarity on how these functions should be correctly framed and applied in Lumenore, especially with respect to:
-
Required date sorting or date hierarchy
-
Appropriate use cases for Lag vs Lead (Leap)
-
Whether these functions are best applied at the dataset level or dashboard level
Could you please share the recommended approach or best practices for using Lag and Lead (Leap) functions in this type of time-based analysis?