I have a few calculations am trying to compute but get syntax error
i tried this but keep on getting Error with the syntax
avgOver({Distance}, ifelse(
${Periodstarting} = 'Day’truncDate(‘DD’,{CREATE_DT}),
${Periodstarting} = 'Month’truncDate(‘MM’,{CREATE_DT}),
${Periodstarting} = 'Quarter’truncDate(‘Q’,{CREATE_DT}),
truncDate(‘YYYY’,{CREATE_DT})),PRE_FILTER)
Also getting same error with this
ifelse(${Mileage_Unit} = ‘Mile’, sum({Distance })/(max({TOT_CHARGE_FAST})+max({TOT_CHARGE_SLOW}+max({TOT_CHARGE_RECUP}), sum({Distances })/1.60934/(max({TOT_CHARGE_FAST})+max({TOT_CHARGE_SLOW}+max({TOT_CHARGE_RECUP})))