Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have given a some script part in this script i have using a group by function and this function + , - are working but when i try to divide two fied is not working
i have attached the script in docx.
In this script there is no division
sreenivas is correct - you have not posted the part which you are saying is not working..
anyways.. are you trying to say that the division script is not working if you try in a similar fashion like the below..
sum(if(DESCRIPTION2='Sales',Amount))* sum(if(DESCRIPTION2='COGS',Amount)) as Amount,
sum(if(DESCRIPTION2='Sales',Amount))/ sum(if(DESCRIPTION2='COGS',Amount)) as Amount,
can also post what happens when you try to divide..
but when i divide by 2 its working.
thanks for the reply
but when i divide or multiply the out put is blank.
well.. i can suggest you run a check first on the data..
create a script like the below, put a table of the three fields and then check all the three fields...
sum(if(DESCRIPTION2='Sales',Amount))* sum(if(DESCRIPTION2='COGS',Amount)) as Amount,
sum(if(DESCRIPTION2='Sales',Amount)) as SalesAmount,
sum(if(DESCRIPTION2='COGS',Amount)) as COGSAmount,
salesAmount and CogsAmount are come correct but Amount comes are wrong.
Check this file