Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total Of Rows of Pivot Table

Hello All,

I have pivot table. Dimension 1= Year Dimension 2= Brand.

Expression is count( distinct ItemID).

YEAR     Brand1    Brand2  Brand3   TOTAL

2011          2              5          6           10

2012          1              6          9            13

Now the issue is that the Total in Pivot is taking the expression as count( Distinct ItemID).

How can i have total 2011 = 11, and 2012 = 16.

Thanks

15 Replies
Not applicable
Author

Hi King,

Can you please try this one in your Expression tab.

Thanks and Regards

Sovan

Images1.png

its_anandrjs

Hi,

Yes you can use the Sum of Rows option in Chart properties >> Expression >> Total Mode.

Toatlmode.png

Regards

Anand

Not applicable
Author

This is for straight table not for pivot.

ashfaq_haseeb
Champion III
Champion III

Hi,

Post you sample data and expected o/p.

Regards

ASHFAQ

ashfaq_haseeb
Champion III
Champion III

You can't have such report with straight table.

Regards

ASHFAQ

simenkg
Specialist
Specialist

You have to use AGGR.

sum(Aggr(Count(Distinct ItemID),Year,BrandID))

jagan
Luminary Alumni
Luminary Alumni

Hi King,

Try this expression

=Sum(Aggr(count( Distinct ItemID), Brand))


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Sample..

For Year 2012 it should be 4 not 3.

its_anandrjs

Hi,

In expression use Aggregation like

=Sum( Aggr( Count( DISTINCT ID),Brand,Year)) //because it has dimension Brand andYear

Note:- if you add more dimension in the chart then you have to use it in the Aggregation expression also

Regards

Anand