Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! 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

15 Replies
simenkg
Specialist
Specialist

=sum(aggr(Count( DISTINCT ID),Year,Brand))

See attached file

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=Sum(Aggr(count( Distinct ID), Brand, Year))

Regards,

Jagan.

Not applicable
Author

I have cyclic group with Year , month and Week.

jagan
Luminary Alumni
Luminary Alumni

Hi,

=Sum(Aggr(count( Distinct ID), Brand, $(=GetCurrentField(cyclicGroupName))))


Regards,

Jagan.

simenkg
Specialist
Specialist

sum(aggr(Count( DISTINCT ID),[$(=GetCurrentField(GroupName))],Brand))

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you got the answer please close this thread by giving Correct Answer to the useful post.

Regards,

Jagan.