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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Neha121
Contributor III
Contributor III

Peek() not working

FY_Final has the data. the peek function is not working 

Data in FY_Final

FY
FY 20-21
FY 21-22
FY 22-23
FY 23-24
FY 24-25
FY 25-26

 

I want v6 = FY 20-21

/////////////////////////////////////

Temp_FY:

LOAD distinct
IF (Year(YearEnd($(vWarehouseLoadDate), 0, 7))- MID("Financial Year (Date Injury Occurred)",9,4)<6,DUAL('FY '&MID("Financial Year (Date Injury Occurred)",6,2)&'-'&MID("Financial Year (Date Injury Occurred)",11,2), MID("Financial Year (Date Injury Occurred)",9,4)),'Before') as "LAST 6 FY"

FROM [D_Date_Occurred.qvd]
(qvd);

NoConcatenate
FY_Final:
LOAD distinct "LAST 6 FY" as "FY"
resident Temp_FY
where "LAST 6 FY" <> 'Before'
order by "LAST 6 FY" asc ;
drop table Temp_FY;

LET v6 = PEEK('FY_Final',0,FY);
Trace v6 - $(v6);

Labels (2)
1 Solution

Accepted Solutions
marksouzacosta
MVP
MVP

Hi @Neha121,

You have reverted the table and column values in the Peek function. Try this:

LET v6 = PEEK('FY',0,'FY_Final');

 

You can also try the FieldValue - recommended:

LET v6 = FieldValue('FY',1);

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

View solution in original post

2 Replies
marksouzacosta
MVP
MVP

Hi @Neha121,

You have reverted the table and column values in the Peek function. Try this:

LET v6 = PEEK('FY',0,'FY_Final');

 

You can also try the FieldValue - recommended:

LET v6 = FieldValue('FY',1);

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Neha121
Contributor III
Contributor III
Author

silly me. thanks for pointing my mistake