I have 3 column
Column 1 from another queryA has the field ValueA
Column 2 from another queryB has the field ValueB
and I want my 3rd column to be: =[queryA].[ValueA]-[queryB].[ValueB]
So put in field of colum3: ValueColumn3: [queryA].[ValueA]-[queryB].[ValueB]
But now I want that if the ValueColumn3 is negative, I want it to show 0 else if it is >0, show the calculated value.
I have tried several CASE but everytime I get a synthax error.
Tried something like this:
CASE
WHEN ([queryA].[ValueA]-[queryB].[ValueB]) BETWEEN -100000000 AND 0 THEN 0
ELSE
([queryA].[ValueA]-[queryB].[ValueB]])
END As ValueColumn3
There must be a better way to do it and I cant get any case to work