Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

Creating subtotals in a table

Hi,

Please see attached.

How can I create subtotals by either Fruit Country or City?

Thanks

6 Replies
MarioCenteno
Creator III
Creator III

!Maybe something like that?


test.png

shamitshah
Partner - Creator
Partner - Creator
Author

Is it possible in a straight table?

MarioCenteno
Creator III
Creator III

Sorry I don't understand, yo could me explain a little more

Anonymous
Not applicable

Yes it is. But can you explain more on what are you looking for? It is not very clear for me what you want.

shamitshah
Partner - Creator
Partner - Creator
Author

Please see attached sample of the output.

Anonymous
Not applicable

Here is the sample i created:

Your table value is called Sum(Sales), so i will write it like this "[Sum(Sales)]"  for easy understanding.

Screen Shot 2018-08-21 at 10.06.47.png

SUM FOR APPLE:

Sum({<Fruit={'Apple'}>}[Sum(Sales)])

SUM FOR LA

Sum({<City={'LA'}>}[Sum(Sales)])

SUM FOR USA

Sum({<Country={'USA'}>}[Sum(Sales)])

BAR GRAPH:

DIMENSION -> Fruit

MEASURE    -> Sum(Sum(Sales))

PIVOT TABLE:

ROW:

Country

City

Fruit

Column:

void

Measure:

Sum([Sum(Sales)])

Straight table:

Screen Shot 2018-08-21 at 10.25.50.png

In a straight table it is not good practice to use a lot of dimensions, so use the one you think is better.

The straight table is like this:

Columns:

Country

Sum([Sum(Sales)])

I hope that helps.

Like, Mark as the answer and mark as helpful if it is. It helps a lot.

Thanks!