Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next


In this example, you are interested in the high performers. A good day in sales is one in which an individual sells more than 80 units. First, you want to identify the day of week:

D code

derive type:single value:WEEKDAY(Date) as:'DayOfWeek'

Values greater than 5 in DayOfWeek are weekend dates. You can use the following to identify if anyone reached this highwater marker during the workweek (non-weekend):

D code

pivot value:ANYIF(Sales, (Sales > 80 && DayOfWeek < 6)) group:EmployeeId,Date limit:1

Before adding the step to the recipe, you take note of the individuals who reached this mark in the anyif_Sales column for special recognition.

Now, you want to find out sales for individuals during the week. You can use the following to filter the data to show only for weekdays:

D code

pivot value:LISTIF(Sales, 1000, (DayOfWeek < 6)) group:EmployeeId,Date limit:1

To clean up, you might select and replace the following values in the listif_Sales column with empty strings: