I could get NANs result with the below message.
WARNING (MDL-360): line `41': MDL expression for identifier 'Iq_avdd' can not be evaluated, because 'I(V_avdd:MINUS)' is invalid.
41: export real Iq_avdd = I(V_iavdd:MINUS)@500u
V_avdd is a instance name that is kind of "vdc" set 0V
Why couldn't I get the evaluation result?
I found the correct way that is "MINUS"-->"p",
I was about to suggest exactly this. You can't use the schematic names for primitive devices (in fact you always need to use netlist names anyway, but mostly they are the same). For primitive devices you'd see the terminal names in the "spectre -h vsource" output, but you can also use the position - so V_iavdd:2 would work too.
Anyway, glad you resolved it.
Thank you for your nice idea, it's very useful info for me.