Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikuser2021
Contributor III
Contributor III

Group By

I have a qvd that has duplicate Bframeid 's (account number)  which is causing my total to be 2 records higher than it should be.  I am trying to use a group by statement to remove the duplicate Bframeid's but doing this results in my total number of Bframeid's to be almost twice as high.

Below is what I had where I was getting a couple extra Bframeid's because the qvd had duplicate Bframeid's.

left join (distinct_soli)

FDR:
LOAD
[Bframeid] as [ACCT_ID],
[Bframeid] as [ACCT_ID_FDR],
[OPENDATE]
FROM [..\..\..\QVD\QVD_FDR.qvd](qvd);

 

Using the group by below to remove duplicate Bframeid's  caused my number of accounts to almost double. 

left join (distinct_soli)

FDR:
LOAD
[Bframeid] as [ACCT_ID],
[Bframeid] as [ACCT_ID_FDR],
min([OPENDATE]) as [OPENDATE]

FROM [..\..\..\QVD\QVD_FDR.qvd](qvd)
GROUP BY [Bframeid] ;

 

Any ideas why this is happening? I don't understand how removing duplicate Bframeid's would increase my total.

 

 

Labels (2)
1 Solution

Accepted Solutions
MayilVahanan

HI @qlikuser2021 

Do you have multiple Open Date for single Bframeid?

Instead of Left join, you can keep the table separately by link with ACCT_ID.

And also, below statement, will give distinct acct_id with minimum open date.. might be, you are using some other calculation which makes double the values.

LOAD
[Bframeid] as [ACCT_ID],
[Bframeid] as [ACCT_ID_FDR],
min([OPENDATE]) as [OPENDATE]

FROM [..\..\..\QVD\QVD_FDR.qvd](qvd)
GROUP BY [Bframeid] 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

HI @qlikuser2021 

Do you have multiple Open Date for single Bframeid?

Instead of Left join, you can keep the table separately by link with ACCT_ID.

And also, below statement, will give distinct acct_id with minimum open date.. might be, you are using some other calculation which makes double the values.

LOAD
[Bframeid] as [ACCT_ID],
[Bframeid] as [ACCT_ID_FDR],
min([OPENDATE]) as [OPENDATE]

FROM [..\..\..\QVD\QVD_FDR.qvd](qvd)
GROUP BY [Bframeid] 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.