Here is the data
I know the recipe offers this functionality to group data easily, however, I am reluctant to put a recipe in between of two dataflows, as it will cause maintenance nightmare in the future.
But, can we do this in dataflow? Dataflow does not offer data grouping by default, but as still we can achieve with it some tricks. Here we go:
The key node here is just cr1 which is a computeRelative node. I add 4 fields here:
1. Partition the data with Date
2. For fields Sum_1 to Sum_3, choose SAQL (not Source Field), the Type should be Numeric and remember to enter Scale and Default Value.
Here is the SAQL Expressioncase when previous(Sum_1) is null then current(Data_1) else current(Data_1) + previous(Sum_1) end
3. For IsLast, choose SAQL (not Source Field), the Type should be Text. Here is the SAQL Expression
case when next(Data_1) is null then "Yes" else "No" end
data after computeRelative, before cleanup
4. Delete unused rows with Filter node and unused columns with Slice node.
In another scenario, if you just need to count items in a group, change Data_1 to 1.
e.g. Count_1 is the field name in CR node
case when previous(Count_1) is null then 1 else 1 + previous(Count_1) end
- computeRelative Transformation
- Einstein Analytics: Transpose data from columns to rows
- Einstein Analytics: Transpose data from rows to columns