Knowledge Drop

How to add a new row of data with LookML


Last tested: Mar 17, 2020
 

For example, starting off with this: Screen Shot 2020-03-17 at 12.47.38 PM.png

And wanting to add a new row of data:
Screen Shot 2020-03-17 at 12.47.56 PM.png

Use a LookML case, something like so:

when: {
label: “show-rss”
sql: ${event_type} = ‘show-rss’ ;;
}
[more when blocks]
when: {
label: “session”
sql: 1=1 ;;
}
For all of the existing values, you map them back to the same value, then put a fourth when block for session. The idea for the case dimension is just to create a dummy row with no data so that you can use table calcs to put the correct value in each row using functions like offset or index to pick out the specific values

 

This content is subject to limited support.                

 

 


0 replies

Be the first to reply!

Reply