Add a column whose value depends on another row's value

I'm trying to implement an "auto-fail" kind of column using table calculations that includes scores for evaluations like below:

 

Employee Category Score

JohnFoo5
JohnBar4
RandyFoo3
RandyBar0
DanielFoo2
DanielBar1
JoeFoo1
JoeBar0

 

I wanna create another column ('calculated score') such that, if their score in the Bar category is 0, they get a 0 on their overall score (basically, their score on Foo also becomes 0). Otherwise, it will just reflect their current score

So in the example above, the desired outcome will be:

Employee Category Score Calculated Score

JohnFoo55
JohnBar44
RandyFoo30
RandyBar00
DanielFoo22
DanielBar11
JoeFoo10
JoeBar00

Where Randy and Joe will now have 0 overall scores because they got 0 in Bar

 

Is there any way to create something like this in Looker using Table Calculations? I've been looking into different ways to implement something similar that will look into the whole table for values (like using OVER PARTITION in SQL) but I can't find any.

 

Thanks!

0 0 227
0 REPLIES 0
Top Labels in this Space