Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulista
Contributor III
Contributor III

Which is the best way to perform an operation on already loaded table

Hi ,

 

I am new to Qlikview and want to perform following operation which i did in Teradata on the already loaded tables in qlikview

 


SELECT Count (DISTINCT hdr_corr_id), HDR_EVT_TYPE FROM
(
SELECT HDR_CORR_ID,HDR_EVT_TYPE,max_date
FROM JOURNEY_VIEW b
INNER JOIN
(SELECT HDR_CORR_ID AS id,Max(HDR_TIMESTAMP) AS max_date
FROM jOURNEY_VIEW
GROUP BY HDR_CORR_ID) a
ON b.hdr_corr_id=a.id
AND max_date=hdr_timestamp
) TAB
GROUP BY HDR_EVT_TYPE

WHat would be best way to do it , in the script or front end.

 

If its a script what would be the best possible script 

Also i can do this in Extract statement when i Load the data --would it be a good practice.

Thanks 

Labels (3)
3 Replies
Anil_Babu_Samineni

You can simply use this in Qlik

Table:

Load *;

SQL SELECT Count (DISTINCT hdr_corr_id), HDR_EVT_TYPE FROM
(
SELECT HDR_CORR_ID,HDR_EVT_TYPE,max_date
FROM JOURNEY_VIEW b
INNER JOIN
(SELECT HDR_CORR_ID AS id,Max(HDR_TIMESTAMP) AS max_date
FROM jOURNEY_VIEW
GROUP BY HDR_CORR_ID) a
ON b.hdr_corr_id=a.id
AND max_date=hdr_timestamp
) TAB
GROUP BY HDR_EVT_TYPE;

Store Table into 'Path/Table.qvd';

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
paulista
Contributor III
Contributor III
Author

Hi Anil,

 

this is what i am doing, but creating a QVD for a simple calculation, would it make sense?is it preferable to store a number of QVD's?

 

how can i do it in just in Resident Load or just in Set Analysis 

Brett_Bleess
Former Employee
Former Employee

The best thing I can do is provide you the Help link on QVD files, to see the full explanation there and use cases to see if that helps you decide which way to go, but from past experience with customers, generally QVD files are used when they do not wish to hit the backend DB heavily to pull the full set of data etc.  

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/QVD_files.htm

Here is a link to the Design Blog area of Community as well, there are hundreds of how-to posts from our internal experts that may be of help too in giving you further ideas on things.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Hopefully this in addition to what Anil gave you helps give you a better overall set of knowledge to make a more informed decision on which way to go with this use case. 

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.