Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wrong Result in Aggr-Function

Hey all,

I have a problem conerning the aggr function. I have a number of keys and over the keys I want to sum the audience.

The problem is that I don't get the exact value in QlikView.

This is the right number in Excel:

Excel.PNG.png

And this is the result in QlikView:

Qlikview.PNG.png

The formula I use for calculation is:

     =Sum(Aggr(Sum(Distinct "audience (in mio) 14+ [adults]"), Keys))

It seems that QlikView calculates more values than it should do. But when I do a "Count(Distinct keys)", I get the right number of keys. That's why I'm confused and I can't figure out the error.

I have attached the Excel file and the QlikView file. I hope someone can help me!

Kind regards

Daniel

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

QlikView is giving Correct Result as there are duplicate Keys in your excel file which is not giving correct results...

Sport1417680,573229166666667
RTL417970,738888888888889
ZDF417970,979166666666667
RTL417970,7875
RTL417980,794444444444444
RTL417980,78125
RTL417980,829861111111111

For the First Record, There are two Values Exists...0.13 and 0.05, But your Excel is only Considering 0.13... The same happenning with above all shown Keys...

Hope this will clear your doubt...

View solution in original post

2 Replies
MK_QSL
MVP
MVP

QlikView is giving Correct Result as there are duplicate Keys in your excel file which is not giving correct results...

Sport1417680,573229166666667
RTL417970,738888888888889
ZDF417970,979166666666667
RTL417970,7875
RTL417980,794444444444444
RTL417980,78125
RTL417980,829861111111111

For the First Record, There are two Values Exists...0.13 and 0.05, But your Excel is only Considering 0.13... The same happenning with above all shown Keys...

Hope this will clear your doubt...

Not applicable
Author

Thank you, Manish! I would have never figured that out!

I'm relieved that the problem lied in the excel data and not within QlikView, Phew!

Have a nice day!