Ordered list to create a hierarchical dimension

dim_hierarchy(...)

Arguments

...

Ordered set of measures names

Examples

retail_orders %>% pivot_rows(order_date = dim_hierarchy( year = as.integer(format(orderdate, "%Y")), month = as.integer(format(orderdate, "%m")) )) %>% pivot_values(sum(sales))
#> sum(sales) #> 2003 3516979.54 #> 2004 4724162.6 #> 2005 1791486.71