简体   繁体   中英

Excluding values from a grand total in Spotfire cross table

I am trying to create a Spotfire cross table that would behave similarly to the Excel in the below screenshot.

I would like to be able to include a list of expenses, but for the "fees", I want the "fees" and all of the itemized fees below it to only be included in the grand total once. Using the attached example, I want the $385 from the "Fees" line item to be included in the grand total and the underlying fees should be listed out with their amounts, but I don't want the underlying fees to be double-counted in the grand total.

Up to this point, I have only been able to create a cross table where the "Fees" item and the underlying fees are all summed up in the grand total, which is not what I want.

I tried to illustrate the point I'm trying to make in the attached screenshot. I want the cross table in Spotfire to calculate like the example on the left, but all I've gotten so far is something similar to the example on the right.

Is there a way to do this in Spotfire?

ExampleOfExpensesForSpotfire

Spotfire subtotals and grand totals are based on the underlying data. There isn't a way to customize or exclude them in their native form--that is to say, without limiting the data. Here is a similar post on this:

https://stackoverflow.com/a/40087286/6167855

One way to sort of achieve what you are wanting to do is nest your Fees as a calculated column and place this on your horizontal axis. For example, insert this calculated column:

case 
when [AREAS_OF_SPEND] = 'Insurance' then 1
when [AREAS_OF_SPEND] = 'Garbage Collection' then 1
when [AREAS_OF_SPEND] = 'Recycling' then 1
when [AREAS_OF_SPEND] = 'Taxes' then 1
when [AREAS_OF_SPEND] = 'Water' then 1
when [AREAS_OF_SPEND] = 'Gas' then 1
when [AREAS_OF_SPEND] = 'Electric' then 1
else 0 
end as [IsFee]

Now add it as a horizontal column on your cross table. You will see this:

结果表

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM