YOu need to replace (in above query) everything before the chart command with your lookup table fetch. Like this
| inputlookup your_lookup.csv
| chart max(BEndTime) as BEndTime max(AppTime) as AppTime max(Infra_Avg) as Infra_Avg max(OverallCustomer) as OverallCustomer by _time KPI | streamstats current=f window=1 values(*) as *_prev | foreach *_prev [eval "<<FIELD>>"=if(isnull('<<FIELD>>'),0,coalesce(('<<MATCHSTR>>'-'<<FIELD>>')*100/'<<FIELD>>',0))] | table _time *_prev | rename *_prev as *
... View more