Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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.
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.
Use the distinct in script
Can you share you app?
Are you concatenating multiple tables with EMP_KEY fields? If not, is it possible to post a sample QVW file with the issue?
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.
Can u share qvw file
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