Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Guys getting wrong output in QlikView

Hi Guys,

I am getting wrong output when try to get Totalcount of EMP_KEY. I have selected a EMP_KEY=5387 and I checked in Database I have only one EMP_KEY 5387 but in QlikView Statistics Box It is displaying Total Count 3, Sum 161661, Average, Max, Min= 5387.

Can anyone explain how does it possible?

Please see attachment

1 Solution

Accepted Solutions
Not applicable
Author

Hi Venkat,

I can't share the QVW file due to security issue. But as per your suggestion I added DISTINCT in below Query & I noticed still It was loading 3 records when I was reloading.

Problem was exactly in the Query which was loading data into DIM_EMP_DATA.QVD. Once I corrected that and reloaded the data into DIM_EMP_DATA.QVD, Everything worked as expected.

DIM_EMP_DATA:

LOAD DISTINCT

     EMP_KEY,

     [EMP_ID],

     [EMP_NAME]    

FROM

DIM_EMP_DATA.QVD (qvd)

WHERE EMP_KEY=5387

View solution in original post

8 Replies
Not applicable
Author

please check your data with the table box.

Add table box and put all fields on it and then check if you have you desire result.?

Also share you app.

Not applicable
Author

Hi Adeel,

I checked it. Table is returning only one value. even I kept where class in my query (WHERE EMP_KEY=5387) and then checking data in table same result. There is only one record but count is 3.

Not applicable
Author

Use the distinct in script

Not applicable
Author

Can you share you app?

Not applicable
Author

Are you concatenating multiple tables with EMP_KEY fields? If not, is it possible to post a sample QVW file with the issue?

Not applicable
Author

Hi Guys,

Sorry, Problem was with Join 1:M and I was just check 1st table where I had only one record. Once I checked query which was loading QVD file then got the issue.

Thanks a lot for all your responses.

Not applicable
Author

Can u share qvw file

Not applicable
Author

Hi Venkat,

I can't share the QVW file due to security issue. But as per your suggestion I added DISTINCT in below Query & I noticed still It was loading 3 records when I was reloading.

Problem was exactly in the Query which was loading data into DIM_EMP_DATA.QVD. Once I corrected that and reloaded the data into DIM_EMP_DATA.QVD, Everything worked as expected.

DIM_EMP_DATA:

LOAD DISTINCT

     EMP_KEY,

     [EMP_ID],

     [EMP_NAME]    

FROM

DIM_EMP_DATA.QVD (qvd)

WHERE EMP_KEY=5387