Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

labels for subtotals?

I am new to Qlikview and I am hoping this is an easy thing.

I am creating a pivot table with sub totals based on the year dimension. 

What I would like to show is the year that is being aggregated to show up as the label for the subtotal combined with a text.

So when I show the total for year 2003, I would like for the label to show "2003 Total" and the 2004 to show "2004 Total".

Is that possible?

Thanks!

15 Replies
Not applicable
Author

I hope you want like this am i right

Untitled.png

Not applicable
Author

Hi

Right click then Properties

then goto Presentation tab

pick field for totals and underneath there is label textbox where

you can write expression for your label something like below where Year is your field

=YEAR & ' Total'

Anonymous
Not applicable
Author

Ebolluca

Yesterday I was I was putting some labels onto some subtotals in a Pivot Table and did not consider I could use use an expression referencing field values as opposed to just typing test in.

Many thanks for pointing this simple yet effective labelling method.

Best Regards,     Bill

Not applicable
Author

Ebolluca,

Thanks!

However when I try to reference a field not even doing the concatenation it just puts a dash.  When I leave it blank the word Total appears on each line. 

Is there a special expression I need to write in order to get it to identify the Year that it is subtotaling?

Not applicable
Author

Nirmal,

What I am trying to do is to get a subtotal line like you would in excel where it shows your rows and then there is one additional row that shows the subtotal for the set of rows above it.

I have the subtotaling working correctly but I can't seem to get the label to spit out the field that is being aggregated.

Thanks!

a_mullick
Creator III
Creator III

Hi Bill, Ebolluca

Did you get this to work? I tried this a while ago and like Kamau below did not get it to work. My feeling is that as the 'Label for Totals' field is not an expression which is evaluated over a dimension, it cannot resolve something like :

     =YEAR & ' Total'

But please let me know if I am misunderstanding something.

Thanks,

Azam

Not applicable
Author

Yes it works in totals, pivots and in dimension labels

Anonymous
Not applicable
Author

Azam / Ebolluca


It works fine for me.


Could you post your qvw so I can look to see what is adrift ?



Best Regards,     Bill

Gysbert_Wassenaar

No, all subtotal labels for one dimension will have the same value. =Year & 'Total' will only work when only one year is selected/possible. See this post for an alternative: Re: Breakdown of Total instead of just the total


talk is cheap, supply exceeds demand