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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
shanu_s9
Contributor III
Contributor III

Peek Function in Qlikview

Hi experts,

I am new to qlikview,

i have data like

 

Month,Sales Volume
March,2145
April,2458
May,1245
June,5124
July,7421
August,2584
September,5314
October,7846
November,6532
December,4625
January,8547
February,3265

But i want to get values of Sales Volume based on Month.

when Month is equal to May then what is the value in Sales Volume. Can we get through Peek

i was tried Peek('Sales Volume',3) as Sales, then i got 1245.But i don't know in which row is having May in Month column

Please tell me.

Thanks

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

FACT:

Load * inline [

Month,Sales

March,2145

April,2458

May,1245

June,5124

July,7421

August,2584

September,5314

October,7846

November,6532

December,4625

January,8547

February,3265

];

SaleforMay:

LOAD Sales RESIDENT FACT

WHERE Month = 'May';

Let vMaySales  = Peek('Sales',0,'SaleforMay');

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

5 Replies
Anil_Babu_Samineni

when Month is equal to May then what is the value in Sales Volume - What does mean here?


Can you let us know your expected to see from above data

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
swuehl
MVP
MVP

In the front end, e,g, in a text box, you can use

=Sum( If(Month ='May', [Sales Volume]))

or

Sum({<Month = {'May'}>} [Sales Volume])

In the script, you can maybe use a lookup() function:

Let vMaySales = Lookup('Sales Volume','Month','May','YourTableName');

vinieme12
Champion III
Champion III

FACT:

Load * inline [

Month,Sales

March,2145

April,2458

May,1245

June,5124

July,7421

August,2584

September,5314

October,7846

November,6532

December,4625

January,8547

February,3265

];

SaleforMay:

LOAD Sales RESIDENT FACT

WHERE Month = 'May';

Let vMaySales  = Peek('Sales',0,'SaleforMay');

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
shanu_s9
Contributor III
Contributor III
Author

Hi Vineeth,

Thank you, i got solution.

shanu_s9
Contributor III
Contributor III
Author

Thank you Stefan for your response.

But i  want to get the result through peek.