Here you can show if I toggle on Subtotals (pic 1), my looker chart shows subtotals for each level of dimensions: test 3, seq and pif group. Can I force Looker not showing subtotals on seq and pif group? The result should be like pic 2
Thanks!
Here you can show if I toggle on Subtotals (pic 1), my looker chart shows subtotals for each level of dimensions: test 3, seq and pif group. Can I force Looker not showing subtotals on seq and pif group? The result should be like pic 2
Thanks!
Hi Hoai,
to put it simply, it is currently not possible to control the subtotal in any way.
If I may ask, what is the purpose of having “seq” and “pif” in the chart if you don’t want it to be totaled? You could simply remove the columns and then only have totals for “test3”.
Hi Blue,
I have the same issue – I need to implement a PnL table in Looker dashboards that should sort items by category and display a subtotal amount below each category.
I’ve run into serious problems with the implementation and made many attempts, but without success. I tried using dashboard properties like hide_totals: true and show_subtotals: false, but they didn’t help. I also tried using a derived table to construct the main table and calculate subtotals, but had major issues with filters and sorting. I even tried using the same visualization approach as the author of this topic, but got the same poor results.
Is it even possible in principle to implement my template in Looker?
I would be very grateful for your answer!
This is my template
Yes, your table looks like a simple Subtotal table in Looker. Just add all the columns and measures to the table and check “Subtotals” next to “Totals” in the top right of the Data View.
Thanks for answer, I tried it, but got not expected result. I need subtotal amount only for one column (category) but looker make subtotal for all dimensions in fact.
In that case, you can try to concatenate all the columns you don’t want to subtotal into one. You can use table calculation for this. Hide the source columns once you have concatenated them.
Your table will then only have Category and ConcatColumn and Measure visible to the subtotal.
Yes, but in this case in does not look like as a table with different columns - in our case it necessary.
It will possible to implement this solution in classic table format?
I expected that must be enough set something like sub_totals: [‘category’] and it will work. But not…
No, unfortunately, subtotal is either On or Off. You cannot just have subtotal be computed on a single column. I did find a product ideas in Pendo (#178513) that you can upvote to maybe have Looker consider adding the option to chose columns to subtotal.
Ok, thank you!
Hello,
Here is an article that a colleague and I wrote together a long time ago which explains a technique to create your own, more customizeable subtotal rows. I think this supports your case: You would code the subtotal feature as described for the one column you want to be subtotalled, and used that one in the visualization rather than the original.
TLDR on concept from the article for those following along:
The key here is that the underlying data shown twice, once in the regular rows and again in the subtotal rows
I hope this helps!
Best,
Kevin