We need to create report which shows
a) total Amount by groups and dates
b) Average Amount per group
Group Date TotalAmount
Group1 01.01.2010 100
02.01.2010 400
Group1 Average 250
Group2 01.01.2010 1000
02.01.2010 10000
Group2 Average 5500
Grand Average 5750
in example above Group1 Average is calculated as sum of Amounts of all Group1 dates (100+400) divided by count of dates (01.01 and 02.01 - 2 dates) = (100+400) / 2 = 250
count of dates may vary due to user input - user selects dates in “between” prompt
Drag and drop Column Group, Date and Amount on the report.
Put Break on Group Column.
Sum the Amount : =Sum([Amount]) (required if agregation for the measure is none at Universe level)
Select Amount column now and aggrgate it for Average (you will see formula in bar as =Average(Sum([Amount])) )
Sum the Amount : =Sum([Amount]) (required if agregation for the measure is none at Universe level)
Select Amount column now and aggrgate it for Average (you will see formula in bar as =Average(Sum([Amount])) )
agregation for the measure is SUM,
so =Average([Amount]) gives the average needed:
Group Date TotalAmount
Group1 01.01.2010 150
02.01.2010 150
03.01.2010 150
Group1 Average 150
but if we remove “Date” column from the report:
all dates become summarized: 450
and averages become equal to these sums:
Group Date TotalAmount
Group1 450
Group1 Average 450 --wrong
how to get this result:
Group Date TotalAmount
Group1 450 - sum of amount between dates
Group1 Average 150 - average between dates (and not between many rows of raw data)
You are correct on this. Seems calculation context require in this but I dont have any idea at this moment if removing the date column will show correct results :(. Lets wait for experts comments.