[My apologies for the length of this message. I thought it easier to explain by example.]
I'm designing a WebI report that aggregates (i.e., sums) "quantity sold" values for each company in my database. I'm encountering confusing results and am hoping someone can explain it.
For illustrative purposes, I've reduced my universe to one table containing two columns: Company Name and Quantity Sold. The contents of the table are as follows:
"Company A", 1
"Company A", 1
"Company B", 2
"Company B", 2
"Company C", 3
"Company C", 3
"Company D", 4
"Company D", 4
In the following WebI tables, the Avoid duplicate row aggregation setting is not selected, by default.
With Quantity Sold configured in my universe as a measure having an aggregation function of None, WebI produces a table with the following (undesired) result:
Company Quantity Sold
----------- -------------
Company A #MULTIVALUE
Company B #MULTIVALUE
Company C #MULTIVALUE
Company D #MULTIVALUE
Enabling the Avoid duplicate row aggregation setting produces a table with the following (again, undesired) result:
Company Quantity Sold
----------- -------------
Company A 1
Company A 1
Company B 2
Company B 2
Company C 3
Company C 3
Company D 4
Company D 4
Changing the Quantity Sold report column's formula from "=[Quantity Sold]" to "=SUM([Quantity Sold])", regardless of the Avoid duplicate row aggregation setting, produces the same (undesired) results. Why doesn't using SUM in the report's column formula produce the desired result?
With Quantity Sold configured in my universe as a measure having a Sum aggregation function, WebI produces a table with the following result:
Company Quantity Sold
----------- -------------
Company A 2
Company B 4
Company C 6
Company D 8
This is the desired result! Changing the Quantity Sold column's formula from "=[Quantity Sold]" to "=SUM([Quantity Sold])", while unnecessary, produces the same result, regardless of the Avoid duplicate row aggregation setting.
Why does using a SUM aggregation function in the universe produce the desired result? And since summing the Quantity Sold values limits the grain of what can be reported (i.e., the individual Quantity Sold values are no longer reportable), isn't this an undesireable approach?
Finally, with Quantity Sold defined in my universe as a dimension (as some threads suggest doing so as to overcome #MULTIVALUE results), WebI produces a table with the following (undesired) result:
Company Quantity Sold
----------- -------------
Company A 1
Company B 2
Company C 3
Company D 4
Note that the values are aggregated; i.e., only one instance of each Company-Quantity Sold combination is listed. Enabling the Avoid duplicate row aggregation setting produces a table with the following (again, undesired) result:
Company Quantity Sold
----------- -------------
Company A 1
Company A 1
Company B 2
Company B 2
Company C 3
Company C 3
Company D 4
Company D 4
However, disabling the Avoid duplicate row aggregation setting and changing the Quantity Sold column's formula from "=[Quantity Sold]" to "=SUM([Quantity Sold])", produces a table with the following result:
Company Quantity Sold
----------- -------------
Company A 2
Company B 4
Company C 6
Company D 8
This is the desired result! Why does configuring the Quantity Sold column as a dimension (and using the SUM formula) produce the desired result?
I always figured it best to configure such numeric columns as measures rather than as dimensions -- but having to configure the Quantity Sold measure with a SUM aggregation function in the universe...as well as the various forum comments about configuring such columns as dimensions to overcome #MULTIVALUE results...makes me wonder. Can anyone comment?
[Thank you for taking the time to read this message!]