Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

AGGR and SUM

Hello

I have a chart and the dimension is called consol_Rep_line.  The rows do do not add up to the subtotals.  For example Employee costs should be 11,007,461

I was wondering if it was possible to AGGR and SUM to round the rows

This is the expression below.  I have tried to add AGGR(sum( but it didnt work.  Should this work?

Thanks

Paul

 
 
 

=if(consol_Rep_Type='H',' ',


//AGGR(sum(

sum(


{$<period = {">=$(vStartPeriod_CY)<=$(vEndPeriod_CY)"},
bud2 = {">0"},
team -= {300,200,850,860,220,830,820},
busarea = {IN},
Datasource = {'Actual'}
>} $(vCurrency))


)
// ,
//
//consol_Rep_line))

1 Solution

Accepted Solutions
Highlighted

Re: AGGR and SUM

See if this works

=Sum(Aggr(
If(consol_Rep_Type = 'H',' ',
Sum({$<period = {">=$(vStartPeriod_CY)<=$(vEndPeriod_CY)"},
       bud2 = {">0"},
       team -= {300,200,850,860,220,830,820},
       busarea = {IN},
       Datasource = {'Actual'}
>} $(vCurrency))
)
, consol_Rep_line))

View solution in original post

6 Replies
Highlighted

Re: AGGR and SUM

The correct order is Sum(Aggr()) instead of Aggr(Sum())

Highlighted
Creator III
Creator III

Re: AGGR and SUM

Thanks Sunny.  I have changed but again the below doesnt work

Do you have any ideas?

 

Sum(Aggr(


sum(
{$<period = {">=$(vStartPeriod_CY)<=$(vEndPeriod_CY)"},
bud2 = {">0"},
team -= {300,200,850,860,220,830,820},
busarea = {IN},
Datasource = {'Actual'}
>} $(vCurrency))
)

,consol_Rep_line))

Highlighted

Re: AGGR and SUM

If statement is not needed anymore? I am confused?

Highlighted
Creator III
Creator III

Re: AGGR and SUM

sorry i didnt include that

 

=if(consol_Rep_Type='H',' ',


Sum(Aggr(


sum(
{$<period = {">=$(vStartPeriod_CY)<=$(vEndPeriod_CY)"},
bud2 = {">0"},
team -= {300,200,850,860,220,830,820},
busarea = {IN},
Datasource = {'Actual'}
>} $(vCurrency))
)

,consol_Rep_line))

Highlighted

Re: AGGR and SUM

See if this works

=Sum(Aggr(
If(consol_Rep_Type = 'H',' ',
Sum({$<period = {">=$(vStartPeriod_CY)<=$(vEndPeriod_CY)"},
       bud2 = {">0"},
       team -= {300,200,850,860,220,830,820},
       busarea = {IN},
       Datasource = {'Actual'}
>} $(vCurrency))
)
, consol_Rep_line))

View solution in original post

Highlighted
Creator III
Creator III

Re: AGGR and SUM

Thanks Sunny - that worked

Kind regards

Paul