Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Shall i use the Aggr function inside the Variable.I have already tried the function inside the variable. It is working on selections. with out selection it is giving overall sum of the measure.
My Variable
=Sum(Aggr(Budget,[Sales Off],Employee))
Sample Data Inline
LOAD * INLINE [
Budget, Employee, Sales Off, Sales Grp
10000, Xavier, 1001, 101
15000, Antony, 1001, 102
10000, Napolean, 1002, 103
20000, Ravinson, 1002, 104
];
with Regards
XavieRavinson
hi
what is the result you are looking for
as it's stand your function in variable will calculate the total sum of budget
but will do it by first creating a virtual table which will give less than ideal performance
inside a variable the expression sum(Budget) will give you the same results
How about this? You should use this variable into Set Expression only
Aggr(sum([Sales Off]),Budget, Employee)
What type of output you are expecting?? What number should be calculated in the variable??
Hi Liron,
Thanks for your reply.
My question is shall i calculate aggregated values using variables. If i use the aggr() function inside the expression i am getting correct value without any selections.
If i use the expression inside the Variable it is not giving the accurate result without selection.
Hi Anil,
Sorry.Why Sum(Sales Off) I am not getting your answer.
With Regards
XavieRavinson
Hi Saima,
Looking for a result
like above without any selections.
Thank you
With Regards,
XavieRavinson.
That gives Data point with the Aggr of Dims
Anyhow, I've seen below reply, I used Simple Sum(Budget) to get this
Without Selection
With Selection
I don't think you need AGGR function here.
Create a Straight Table.
Dimension
Employee
[Sales Off]
Expression
SUM(Budget)
Aggr is same as Group By in script.
Aggr will create a virtual table.
Please go through below two links to get better idea of Aggr function.
Hi, Why do you need to use aggr inside a variable to obtain above result. You can create a straight table with Dimensions(sales Grp, Employee) and measure as sum(Budget). If u still insist on using Aggr function use Aggr(sum(Budget),Sales Grp,Employee) as expression and Dimensions(sales Grp, Employee).