
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Peek on first row in subset
Hi, I want to use first row in a subset of data as comparison.
This is how I have script right now:
if(peek(Key)= Key, DateComparison - peek(StartDateComparison,0),0) as Days
But peek(StartDateComparison,0) will always find First row in table, not first row in subset (Bold Row).
So what I want is that all dates should for all Key should be Compared with StartDateComparison
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Try like below
if(peek(Key)= Key, peek(StartDateComparison),StartDateComparison) as StartDateComparison
By using above script, we can able to see "StartDateComparison" values in all rows. Then, u can simply sub those 2 fields to get the "days".
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Try like below
if(peek(Key)= Key, peek(StartDateComparison),StartDateComparison) as StartDateComparison
By using above script, we can able to see "StartDateComparison" values in all rows. Then, u can simply sub those 2 fields to get the "days".
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brilliant @MayilVahanan this was exactly what I needed.
Thanks!
