Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

total sum is not correct


Hi everybody,

I have a problem with a sum in Qlikview.

The column DefTax STBADJ is calculated with a percentage. The percentage is dependant on the KontoID.

The Detailed lines are correct, but not the TotalLines [called "Gesamt"].

DefTax STBADJ:

=

if(KontoID='60740', -Körperschaftsteuersatz*[Akt. Jahr STBADJ], if(KontoID='60746',-Gewerbesteuersatz*[Akt. Jahr STBADJ],
-Unternehmenssteuersatz*
[Akt. Jahr STBADJ]))

hc_133.jpg

I think the Total-Line is calculating with the percentage from the Total-Line.

But this should not be done.

Does anybody knows a solution?

Very much thanks in advance.

1 Solution

Accepted Solutions
cwolf
Creator III
Creator III

Hi Christian,

You have in your expression no any aggregation such Sum() or others. Without them a correct total can not be calculated. Totals calculated Qlikview in a pivot table always by using the expression over all possible data lines.

Regards

Christian

View solution in original post

4 Replies
cwolf
Creator III
Creator III

Hi Christian,

You have in your expression no any aggregation such Sum() or others. Without them a correct total can not be calculated. Totals calculated Qlikview in a pivot table always by using the expression over all possible data lines.

Regards

Christian

preminqlik
Specialist II
Specialist II

hi try this

sum(aggr(sum(if(KontoID='60740', -Körperschaftsteuersatz*[Akt. Jahr STBADJ], if(KontoID='60746',-Gewerbesteuersatz*[Akt. Jahr STBADJ],
-Unternehmenssteuersatz*
[Akt. Jahr STBADJ]))),TaxCode,BS_Line,KontoID))

Not applicable
Author

Hi everybody,

thanks for you help. Now I got in every line 0,00.

So I think it is not working. I want the correct amount in the "partial sums" line.

So additional help would be very welcome.

hc_134.jpg

preminqlik
Specialist II
Specialist II

so do one thing make another expresiion for check

=dimensionality()

and according to above resulatnt dimensioanlity value , write expression like below :

if(dimensionlity()=1,exp1,exp2)