How can i calculate ESCI and PT in salary structure on earning component?

Hello,
I have been used for earning components to calculate ESCI and PT.
If set LWP 2 days, it will not work However if LWP 0 then only formula work.
Please guide me. Thanks