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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

totalling in pivot table

Hi Experts,

i have a pivot table calculation on counting invoices by month

and the expression is

Expr : Count(DISTINCT if(ORDTYPE='SL', if(IsNull(IVNO),'', IVNO)))/sum(SRDAYS)

my table looks like before.jpeg

i want the sum off all rows as total. so i have used like

Expr :

=sum(AGGR(

Count(DISTINCT if(ORDTYPE='SL', if(IsNull(IVNO),'', IVNO)))/sum(SRDAYS)

,BRCODE

,BRNAME

,RSMNAME

))

then i m not getting values for all branch in all months.

the table looks like after.jpeg.

how can i sort out the issue.

please help

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

=sum(AGGR(

Count(DISTINCT if(ORDTYPE='SL', if(IsNull(IVNO),'', IVNO)))/sum(SRDAYS)

,BRCODE

,BRNAME

,RSMNAME,

CalendarMonth //YourPivoted Dimension

))

If this doesn't work, then try this:

=sum(AGGR(NoDistinct

Count(DISTINCT if(ORDTYPE='SL', if(IsNull(IVNO),'', IVNO)))/sum(SRDAYS)

,BRCODE

,BRNAME

,RSMNAME,

CalendarMonth //YourPivoted Dimension

))

Best,

Sunny

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

Try this:

=sum(AGGR(

Count(DISTINCT if(ORDTYPE='SL', if(IsNull(IVNO),'', IVNO)))/sum(SRDAYS)

,BRCODE

,BRNAME

,RSMNAME,

CalendarMonth //YourPivoted Dimension

))

If this doesn't work, then try this:

=sum(AGGR(NoDistinct

Count(DISTINCT if(ORDTYPE='SL', if(IsNull(IVNO),'', IVNO)))/sum(SRDAYS)

,BRCODE

,BRNAME

,RSMNAME,

CalendarMonth //YourPivoted Dimension

))

Best,

Sunny

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Add your CalendarMon.... dimension to the aggr too.


talk is cheap, supply exceeds demand