Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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';
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
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