Hi MyDBR Team:
I'm trying to do some calculations over calculated columns but I got 0 as result. The column Profit is showing accurate values but the %Profit shows only zeros.
Here is a sample of what I'm trying to do:
select 'dbr.calc', 'Profit', '[Total_Rev]-[Cost]';
select 'dbr.calc', '%Profit', '[Profit]/[Profit.sum] * 100';
select 'dbr.sum', 'Cost', 'Total_Rev', 'Profit';
SELECT Device, Total_Rev, Cost, NULL as Profit, NULL as '%Profit' FROM Table group by Device