How do I create sum or total data in same column on dashboard?
![wtuntana](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar21.png)
wtuntana
Registered Posts: 10 ✭✭✭✭
For example, I have this data set
Name Week1 Week2 Week3 Week4
A 10 20 30 40
B 41 31 21 11
C 3 4 5 6
I want the dashboard shows
Name Week1 Week2 Week3 Week4
A 10 20 30 40
B 41 31 21 11
C 3 4 5 6
Total 54 55 56 57
or
Name Week1 Week2 Week3 Week4
A 10 20 30 40
B 41 31 21 11
C 3 4 5 6
Total 54 55 56 57
--------------------------------------------------------
Grand total 222
Or modify the data table to use sum in the same column.
Thank you.
Name Week1 Week2 Week3 Week4
A 10 20 30 40
B 41 31 21 11
C 3 4 5 6
I want the dashboard shows
Name Week1 Week2 Week3 Week4
A 10 20 30 40
B 41 31 21 11
C 3 4 5 6
Total 54 55 56 57
or
Name Week1 Week2 Week3 Week4
A 10 20 30 40
B 41 31 21 11
C 3 4 5 6
Total 54 55 56 57
--------------------------------------------------------
Grand total 222
Or modify the data table to use sum in the same column.
Thank you.
Tagged:
Best Answer
-
With such a small table the easiest is to use a recipe to get the final table you want, then publish it to the dashboard.
Here is an example using only a visual prepare recipe, it involves transposing, computing the sum, then transposing back.
Another solution to only get the sums is to use a prepare recipe to Fold your data (the opposite of a pivot), then use a groupby "Week" to get the sums.
Answers
-
I see trans > sum > trans back > total.... nice idea
Thank you cperdigou. -
Also attaching a sample Python code recipe, which adds a sum value to an existing column. This would be another potential option to explore.