G
Guest
I am working with 2 columns of data and I am taking the % difference between
them => Column A and Column B. If Column A = ' 0 ' or is NULL, then I want
the % calculation to return a value of ' 1 '. But I cannot get the SQL
right. Here is what I have:
IIF([TABLE_X].[columnA] is not null OR [TABLE_X].[columnA] <> '0'
,(([TABLE_Y].[columnB])-([TABLE_X].[columnA]))/([TABLE_X].[columnA]),1) AS
Perc_Chg
So what I am telling Access to do (but it is not listening to me) is: 'If
Column A is not a null value or it is not equal to 0, then perform the
percentage change calculation. If it is null or = 0, then return a value of
1.'
them => Column A and Column B. If Column A = ' 0 ' or is NULL, then I want
the % calculation to return a value of ' 1 '. But I cannot get the SQL
right. Here is what I have:
IIF([TABLE_X].[columnA] is not null OR [TABLE_X].[columnA] <> '0'
,(([TABLE_Y].[columnB])-([TABLE_X].[columnA]))/([TABLE_X].[columnA]),1) AS
Perc_Chg
So what I am telling Access to do (but it is not listening to me) is: 'If
Column A is not a null value or it is not equal to 0, then perform the
percentage change calculation. If it is null or = 0, then return a value of
1.'