Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
djbloiss
New Contributor III

Find a specific Field Record combination in table

In an expression I have a unique value and I need to pull a specific field value from a table.  How can I do this?  I tried looking at the peek function (I know peek can only be used in the script) and at the previous function but I cannot figure it out?  If I cannot do it in an expression I am willing to do it in a script and save it in a variable. 

Tags (3)
1 Solution

Accepted Solutions

Re: Find a specific Field Record combination in table

This is one way to do it in the script

Table:

LOAD DateKey,

    [Transaction Date],

    [Week Count]

FROM

[..\..\Downloads\SampleData (1).xlsx]

(ooxml, embedded labels, table is MultiCalendar);


Temp:

LOAD [Week Count]

Resident Table

Where [Transaction Date] = Today();


LET vCurrWeekCount = Peek('Week Count');

DROP Table Temp;

15 Replies
YoussefBelloum
Esteemed Contributor

Re: Find a specific Field Record combination in table

Hi,

can you add random data with an example ?

djbloiss
New Contributor III

Re: Find a specific Field Record combination in table

Unique Value (not the key though)
Return Value
UV110
UV220
UV330
UV440
UV550
UV660
UV770
UV880

I have UV3 and I want to return 30.

Re: Find a specific Field Record combination in table

May be this

Only({<[Unique Value] = {'UV3'}>} [Return Value])

YoussefBelloum
Esteemed Contributor

Re: Find a specific Field Record combination in table

what do you want to do with this ?

show only one row with UV3 and 30 ?

filter the table from the script ?

djbloiss
New Contributor III

Re: Find a specific Field Record combination in table

sunny but how will I tell it what table to pull that from?

djbloiss
New Contributor III

Re: Find a specific Field Record combination in table

I need to use it in set analysis.

djbloiss
New Contributor III

Re: Find a specific Field Record combination in table

btw when I say table I mean I need to pull it from a data table, not a straight table or pivot table.

Re: Find a specific Field Record combination in table

Is this data in some field? I mean is UV3  a field value and is 30 a field value or an expression's output?

djbloiss
New Contributor III

Re: Find a specific Field Record combination in table

What I am specifically doing is trying to use Today's date to find a specific week_count in my CalendarTable and then use that in set analysis to filter results.

Remember I am new and I am trying to think of solutions.   so I have been searching and using a lookup value in my script to set a variable seems like it might work.  Do you think that would be a good solution?