Quickie: Show totals only for one column in a text table but keep all details in the other columns

For today I got a tip which mostly is layout’ish but also somewhat data privacy related

The question was how we could get a table like this:

to only show Details for in this example the sales but profits should only be shown in the (Sub) Total line.

Building on Jeff Shaffer’s great blog post on custom subtotals over at dataplusscience.com we can build out the solution pretty easily.

Create a calculated field that we use to replace our [Profit] field:

    if SIZE()=1 then sum([Profit]) else null    END

Set it to – in this example – compute using Sub-Category


and this is what you get:

The charming part is that this does not require any “invisibility” via formatting. Also, a user can not “unhide” any formatted values by clicking the table.

And that’s my quick tip for today, I hope you found that useful.

As always appreciate your feedback.

Until next time.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s