Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Example:
if(country='A' and state='B' and city='C' , sum(sales)/ count(city='C'), sum(sales))
Thanks in advance.
Not sure what all dimensions you have, but you at least need country, state and city because they are not aggregated
if(country='A' and state='B' and city='C' , sum(sales)/ count(city='C'), sum(sales)) as A sales
resident table
group by Country, state, city;
its working for me
Are you using this in the script? I don't see anything wrong with the if statement, but if you are using this in the script, you might need a group by statement in your table load. May be provide more information to help you better
yes i am using this in the script , tried using group by too. correct me if i am wrong in writing the statement.
Example:
if(country='A' and state='B' and city='C' , sum(sales)/ count(city='C'), sum(sales)) as A sales
resident table
group by Country;
yeah its working for me too in the front end but not in the script.
Not sure what all dimensions you have, but you at least need country, state and city because they are not aggregated
if(country='A' and state='B' and city='C' , sum(sales)/ count(city='C'), sum(sales)) as A sales
resident table
group by Country, state, city;
Thanks a lot sunny, its working now with group by Country, state, city.