Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
can we use aggregate functions in load statement if so how to use these functions with group by clause in load statement...?
and where we can use these functions?
in script--
load
id,
sum(sales) as sales
group by id;
------------------------------
in expression
Aggr(sum(sales),id)
In script aggrgation function is like a group by function
on expression side we use aggr function
for calculation like eg:
you have 3 dimensions and 2 expression in pivot or straight table then your ist expression gives the data correct on the basis od 1st dimension .by default it gives hte data on the basis of all dimension menas 3
to caluculate forcefully you have to use aggr function like this way
aggr(sum(Expression),Dimension1)
but in script side use Group by statement to extract the data of some calculation on the basis of particular field
like this
load a,
min(c) as Minimumvaluec
from table
group by a;
see the attached example and i use first sorted value concept in that