Hi everyone,
Iām trying to create a metric block in Corteza to calculate the conversion rate of referrals based on their Status. Hereās the logic Iām aiming for:
pgsql
CopyEdit
Conversion Rate = Admitted / (Admitted + Rejected)
Where:
- 
Admitted means 
status = 'Admitted' - 
Rejected includes:
Denied - Out of NetworkDenied - No Service AreaDenied - No CapacityLost - Competition
 
Iāve added two metrics inside the block:
- One with filter 
status = 'Admitted' - One with filter for the 4 rejected statuses above
 
Then, in the Transform value, I tried:
javascript
CopyEdit
(admitted / (admitted + rejected)) * 100
But I keep getting an error like admitted is not defined.
I understand that v refers to the current value, but how can I reference multiple metric values in a transform? Or is this not possible in my version of Corteza?
Iāve attached two screenshots:
- One showing the āadmittedā metric config
 - One showing the ārejectedā metric config and the transform value attempt
 
Goal: Just to have the conversion % shown on a single tile (e.g., ā33%ā).
If this isnāt possible inside a metric block, is there a recommended way to calculate it via workflow and display it?
Thanks in advance!



