Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
please give answer to use PEEK or any function within Qualify and Unqualify statement. below is eg script
QUALIFY *;
funcPEEKtbl:
LOAD Year,
Sales,
PEEK(Sales) As PeekfuncWrk
FROM
Book1.xlsx
(ooxml, embedded labels, table is Sheet1);
UNQUALIFY *;
result is NULL as done with below experiments
1. PEEK(Sales) As PeekfuncWrk
2. PEEK('Sales') As PeekfuncWrk
3. PEEK(funcPEEKtbl.Sales) As PeekfuncWrk
4. PEEK('funcPEEKtbl.Sales') As PeekfuncWrk
5. PEEK(funcPEEKtbl.Sales,-1,funcPEEKtbl) As PeekfuncWrk
6. PEEK('funcPEEKtbl.Sales',-1,'funcPEEKtbl') As PeekfuncWrk
but PEEK function works correctly without Qualify statment
This should work:
PEEK([funcPEEKtbl.Sales]) As PeekfuncWrk
or
PREVIOUS(Sales) As PeekfuncWrk
- Marcus
tried but not working. below is the original script
QUALIFY *;
funcPEEK2015Budgettbl:
LOAD Year,
[2015 Budget]
FROM
[Practicing Data Files\Data for func Peek and Previous1.xlsx]
(ooxml, embedded labels, table is [2015Budget]);
funcPEEK2016Budgettbl:
LOAD Year,
[2016 Budget],
Peek([funcPEEK2016Budgettbl.2016 Budget]) As funcBudgetPEEK
FROM
[Practicing Data Files\Data for func Peek and Previous.xlsx]
(ooxml, embedded labels, table is [2016Budget]);
UNQUALIFY *;
executed script successfully but field funcBudgetPEEK returns ' - ' value
Peek([funcPEEK2015Budgettbl.2015 Budget]) As funcBudgetPEEK
Try this:
QUALIFY *;
funcPEEK2015Budgettbl:
LOAD Year,
[2015 Budget]
FROM
[Practicing Data Files\Data for func Peek and Previous1.xlsx]
(ooxml, embedded labels, table is [2015Budget]);
funcPEEK2016Budgettbl:
LOAD Year,
[2016 Budget],
Peek('funcPEEK2016Budgettbl.2016 Budget') As funcBudgetPEEK
FROM
[Practicing Data Files\Data for func Peek and Previous.xlsx]
(ooxml, embedded labels, table is [2016Budget]);
With an inline-table it worked:
QUALIFY *;
t: load [a w], peek([t.a w]) as b, previous([a w]) as c inline [
a w
10
20
30];
UNQUALIFY *;
exit script;
Loading from an excel might require a slight different syntax whereby I suggest to rethink the whole qualify-approach then there is rarely an added-value with them rather the opposite with various problems, see also: Re: qvd's
- Marcus
sorry to say but i need answer for external data instead of Inline
in my first post (number 4) i already tried with single quote but no use
I guess what Marcus meant was that you can use this:
Previous([2016 Budget]) As funcBudgetPEEK
Please provide an excel data-example and take also into account that developing datamodels in qlik is much easier without qualifying which is even by mid-sized data-architectures not enough to control and overview the data-sources.
- Marcus
i am in practice of qlikview. so i was practicing on different charts and functions in one .qvw file instead of separate .qvw. function is working Good without Qualify statement. thanks Marcus for ur words 'developing datamodels in qlik is much easier without qualifying'. i removed Qualify statement and practiced in different .qvw file, its working fine