Need Looker Help creating Custom Dimension using multiple functions

Hello! Hoping someone is able to help in what is seeming to become a rather complicated custom dimension.

usecase: There is a field in an existing database called "code". Possible outputs are similar to HS1, HS2. I'm trying to update this output based on another field in the same datatable (fee). If the fee is 0, then I want to create a new 'code' with a "P" inserted in the middle of the code, such that if fee = 0, code = HSP1, or HSP2

I'm getting stuck in how to insert a letter conditionally in the middle of a string.

Thank you!

0 1 165
1 REPLY 1
Top Labels in this Space
Top Solution Authors