Question

I'm working on a SSAS cube to allow user to analyze some sales. So, I created a fact table to record all sales and few dimensions to browse inside data (category / location & store, etc...).

This is a example of the fact table output (from SQL Server Management Studio) :

enter image description here

When I browse my cube, I can review all sales including date, quantity, etc. However, when I add some fields like the "unit price" or the "unit cost", it returns me a strange result probably due to an aggregate behavior. It seems it return the sum of all matching rows (aggregateFunction property).

How to simply display the unit price of a sale without apply any calculation to the unit price column. The None value for the AttributeFunction display BLANK/NULL.

Was it helpful?

Solution

If your unitCost and unitPrice are the same for each product (I mean unitCost can be only 77.6 for product_id = 2), you can just use average (or even emulate average by SUM/COUNT) - but only for product dimension on axis! Another dimensions will show real average values.

Maybe it's better to use this 'static' fields like attribute properties in 'Product' dimension? But you still need to add some logic to choose one value for several (or all) product members selected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top