
1. Re: Hi...What is the Difference between 1. Fixed { CustomerName} : Avg (Sales) } & 2. Avg ( Fixed {CustomerName : Sum(Sales) })
lei.chen.0 Dec 6, 2018 6:38 PM (in response to Mahadevan Krishnan)Hello Mahadevan,
It seems that your calculations have some problem, so I modified them to,
Calculation 1 : {FIXED [Customer Name] : AVG (Sales) }
Calculation 2 : AVG ( {FIXED [Customer Name] : SUM(Sales) })
They are different from the very beginning.
Aggregated vs Not Aggregated
The result for only one customer, and the calculation steps.
Regards
Lei

2. Re: Hi...What is the Difference between 1. Fixed { CustomerName} : Avg (Sales) } & 2. Avg ( Fixed {CustomerName : Sum(Sales) })
Ray Randall Dec 6, 2018 7:23 PM (in response to Mahadevan Krishnan)1 of 1 people found this helpfulHi Mahadevan,
I like to think about LODs in this way.
1. Fixed { CustomerName} : Avg (Sales) }
I read this LOD as "For EACH customer, determine the average Sales."
e.g.
Customer A
Sale 1: 1
Sale 2: 2
Sale 3: 3
LOD = 2
Customer B
Sale 1: 4
Sale 2: 5
Sale 3: 6
LOD = 5
Because the result of an LOD expression is not aggregated, you can think of the result as an additional column of raw data. Imagine a new table with a Customer column and an Average Sales column.
Customer Name: Average Sales (LOD)
Customer A: 2
Customer B: 5
If you aggregate the LOD, then you get:
avg(LOD) = (5+2)/2 = 3.5 This is the average of all customer's average sales values.
2. Avg ( Fixed {CustomerName : Sum(Sales) })
I read this LOD as "For EACH customer, sum all the Sales.
Then, get the average of all those sums."
e.g.
Customer A
Sale 1: 1
Sale 2: 2
Sale 3: 3
sum(Sales) = 6
Customer B
Sale 1: 4
Sale 2: 5
Sale 3: 6
sum(Sales) = 15
Customer Name: Sum of All Sales
Customer A: 6
Customer B: 15
avg(LOD) = (6+15) / 2 = 10.5 This is the average of all customer's total sales values.
Think about LODs starting with the aggregation INSIDE the LOD. Then consider how those results are aggregated.
Ray

3. Re: Hi...What is the Difference between 1. Fixed { CustomerName} : Avg (Sales) } & 2. Avg ( Fixed {CustomerName : Sum(Sales) })
Mahadevan Krishnan Dec 6, 2018 9:15 PM (in response to Ray Randall)Thank You Ray. Much Appreciated