you have nulls in the data set -
I didn't run through everything but wrapping the total case statement in zn brought back marks on th 0 origin - an idi
I looked in the data and all the values for strat fit are null
I think it comes from the data the highlighted value is "Header" and it has a lead blank -
that comes from Header
so you will not match the parameter
no LOD needed just a check on the logic
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.