Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
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

Labels (1)
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
Champion III
Champion III

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
Partner - Champion III
Partner - Champion III

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
Champion III
Champion III

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