Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Qlikview peek function is working fine in the version 12.10.20600.0 but it seems that it is not working as per the exceptation on the version 12.40.20400.0.
It is returning more than 1 record.
Could you please suggest on this?
Also the comparison variables are not working without num function.
Below is the snapshot for the error in the Qlikview version 12.40.20400.0,
Thanks
There are at least some mistakes by calling variables, for example:
...
FOR i=0 to ($(numRow)-1);
...
'$(vAD)' as ANALYSIS_DATE,
...
Resident PERF_TEMP
Where ANALYSIS_DATE<='$(vAD)' and BUSINESS_DATE_PERF='$(vBD)'
Group By ACCT_SYSTEM_PORTF_NO_PERF,BUSINESS_DATE_PERF;
...
with too much respectively missing quotes. Number should be called without quotes and strings with quotes.
- Marcus
Hi Marcus,
1. We have the exact same code for both of the versions.
2. I already tried as per the above suggestions but nothing works.
I am attaching the log where the script runs successfully.
The only difference I observed that the vAD and vBD dates ate in the numeric formats in the 12.1 which is not appearing in 12.4.
also, whenever I am trying to achieve the above using the num function, peek function returns more than one value which is again not as per the need so our results are not matching.
Even if I can run the data model layer as it is based on the already created QVd's in the version 12.1 then also some values are missing which is weird behavior.
Thanks
You need to go to the appropriate load-steps which generate these data to find the cause why they are treated differently. Means you load these data resident from any table and even these source-data might have another load in which the interpretation could have changed.
- Marcus
Hi Marcus,
The differences are as per the below.
Version 12.1 where script runs successfully.
Version 12.4 where script fails ->
Num with peek is not the solution for this. The behavior is again different.
I am pretty sure, this issue is related to different versions. Ans the issue whatever we have in QV version 12.4 the same appears in Qlik sense.
I think nothing to do anything in the code but we need some assistance from people like you or from the qlik.
Thanks
Thanks.
The difference is quite clear. In 12.1 it's a date without a formatting and in 12.4 it's a formatted timestamp whereby it's not obvious it's a string or a dual-value (means string-value + numeric-value)?
This means your issue happens in beforehand - not within your loop respectively the error there is an aftereffect. Therefore take a look on all load-steps before and anywhere there you will find that the data will be interpreted differently.
- Marcus
Hi Marcus,
Yes exactly, the issue is because of interpretation of the data which happened differently in the both versions.
But I am not getting how to interpret the data in the same way how it was in the version 12.1?
Thanks
I suggest to start at the beginning of the ETL process. This may be not these application else some applications before which the data generate within qvd's or from where the data are loaded.
Of course you may tweak the issue in the step where you load the data here or assigning the variables with something like:
floor(timestamp#(YourTimestampField, 'FormatPattern'))
but then you may run in other cases in similar issues, too. It's recommended to prepare all data as soon as possible - means by fetching the raw-data - not to need to do such adjustments multiple times on various places within the script and/or the UI.
- Marcus
Hi Marcus,
Currently, I am using the same QVD for both of the places.
QVDs that are generated in version 12.1, that I am using in 12.4.
Do I need to do anything related to the same.
Is there are issues if I can use the QVD's that are generated in the lower version?
Thanks
I think there are no issues with the qvd creation or usage. But anywhere within your load-chain is anything different. It might be not the qvd's else another step. There are various possibilities why certain data might be interpreted differently - but that the data within your older release are dates and within the newer one are timestamps (independent from the format-stuff) means that the values itself aren't identically.
Therefore I would like to repeat my suggestion from above to go step by step through your load-chain to see where will be which data loaded and how they are loaded/interpreted. It's not a special approach else a common method to validate data - and quite often it's useful not to do everything within the original chain else to pick the parts separately within another qvw. Important is to make this kind of systematically - starting completely at the beginning or reverse from the end or by larger chains also to jump in the middle and from the middle to the middle of the middle - what happens, does the data look like expected or not. Usually it doesn't take long to find the place where something unexpected happens ...
- Marcus
Hi @deep2021
Looking at the original screenshot of your error, it would appear that the single quotes are missing from the ANALYSIS_DATE date in the WHERE statement.
I think you need to add them in here:
Resident PERF_TEMP Where ANALYSIS_DATE='$(vAD)' and BUSINESS_DATE_PERF='$(vBD)';//and ACCT_SYSTEM_PORTF_NO_PERF='$(vPort)
Hope that helps.
Steve