
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
can you add random data with an example ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unique Value (not the key though) | Return Value |
---|---|
UV1 | 10 |
UV2 | 20 |
UV3 | 30 |
UV4 | 40 |
UV5 | 50 |
UV6 | 60 |
UV7 | 70 |
UV8 | 80 |
I have UV3 and I want to return 30.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
Only({<[Unique Value] = {'UV3'}>} [Return Value])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what do you want to do with this ?
show only one row with UV3 and 30 ?
filter the table from the script ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sunny but how will I tell it what table to pull that from?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to use it in set analysis.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
btw when I say table I mean I need to pull it from a data table, not a straight table or pivot table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this data in some field? I mean is UV3 a field value and is 30 a field value or an expression's output?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- « Previous Replies
-
- 1
- 2
- Next Replies »