1

I would like to add a subtotal row at the bottom of a compare table in an Einstein Analytics dashboard. The table is made up of sums of measures grouped by two dimensions. The subtotals needed are those of the second group, such that this table

Group1     Group2   A   B
X           M       8   10
            N       5   100
Y           M       3   50
            N       7   200

will generate the subtotals

subtotals   M      11   60
            N      12   300

and add them at the bottom of the table.

Einstein Analytics dashboards do not appear to have this functionality. Is there a way to do this with SAQL?

1 Answer 1

1

You'd have to create a second subquery such as:

q2 = group q by Group2;
q2 = foreach q2 generate
    "subtotals" as Group1,
    Group2,
    count() as A,
    sum(DataXY) as B;

Afterwards union your 2 queries together.

result = union q, q2;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .