Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
doespirito
Creator
Creator

Problem with AGGR function

hi ,

I have a problem with aggr function.

(see attached qvw.)

I have two tables :

- one named PAIE with AMOUNT per COST_C/YEAR/MONTH/PERSO_ID/ACCOUNT

- one named TAX with with TAXE_RATE per  YEAR/MONTH/PERSO_ID


I have linked them in qlikview with a key (YEAR/MONTH/PERSO_ID) so every line of PAIE table has the good tax rate from TAX table.


Know, i want to make a pivot table aggregated on COST_C for only ACCOUNT=32007.


In excel, the result would be :


excel.PNG

witch is made like this :

excel2.PNG

I have tred to do that with set analysis and aggr function but it gives me a wrong result.

Could you help me ?

Thank you very much

Arnault

1 Solution

Accepted Solutions
sunny_talwar

Remove other dimensions and Tim's solution seems to be working the way you would want

Capture.PNG

View solution in original post

4 Replies
zhadrakas
Specialist II
Specialist II

try this Expression

sum(AMOUNT) + sum(AMOUNT*TAX_RATE)

or See attended qvw

regards

tim

ahaahaaha
Partner - Master
Partner - Master

Hi,

May be like this?

Sum ({<ACCOUNT={'32007'}>}TAX_RATE)


Result

1.jpg

Example at attached file

Regards,

Andrey

doespirito
Creator
Creator
Author

thank you Andrey and Tim,

but i only want to see cost center in the pivot table dimension and the calculation for only three lines witch gives 225.

aggr..PNG

sunny_talwar

Remove other dimensions and Tim's solution seems to be working the way you would want

Capture.PNG