Hi all. Finding my way around Looker after many years with Tableau and R. Thanks for reading.
This is a very boring question, but the client wants certain values to show in only the first row of the view. What I mean is this: Say we have a very simple table.
create table foobar (idx int, val varchar(5));
insert into foobar (idx, val) values (1, 'hello'), (2, 'hello'), (3, 'world'), (4, 'world');
If the user viewed this table in Looker and sorted ascending by idx, it would look like
1 - hello
2 - (null)
3 - (null)
4 - (null)
But if they sorted it descending it would look like
4 - world
3 - (null)
2 - (null)
1 - (null)
I tried a table calculation something like this:
if(row() = 1, ${explore_name.val}, null)
But I get an error:
Field "explore_name.val" is not in the current query
Is there a way around what I’m running into here? Maybe I’m just going about it wrong?