Skip to main content
3 of 5
added 11 characters in body
Tom V
  • 15.7k
  • 7
  • 64
  • 87

That behaviour is dependent on your KeyColumns setting.

Given a cube with these 2 named queries in the datasource view

Cities:

SELECT        1 AS id, 'India' AS country, 'Calcutta' AS city
UNION
SELECT        2 AS id, 'India' AS country, 'Bangalore' AS city

Sales:

SELECT        1 AS city, 5 AS salesamount
UNION
SELECT        2 AS city, 5 AS salesamount

A dimension based on cities, linked to the Sales table on the sales.city->cities.id relation that looks like this, using the id column as KeyColumns:

enter image description here

The result is this:

enter image description here

However, if I change the KeyColumn property to country for that attribute like this:

enter image description here

The result is all sales are reported under one single country:

enter image description here

I agree the documentation is a bit terse:

Contains the column or columns that represent the key for the attribute, which is the column in the underlying relational table in the data source view to which the attribute is bound. The value of this column for each member is displayed to users unless a value is specified for the NameColumn property.

Where you should interpret it as "there is one separate attribute member for each distinct value in the key column, even if the displayed value is the same"

Do note however that changing the key column might require you to change the NameColumn and the OrderBy properties.

Tom V
  • 15.7k
  • 7
  • 64
  • 87