Novice question: grain level
2 posters
Page 1 of 1
Novice question: grain level
Hello,
Please can you clarify something about the grain level in dimensions.
Suppose you have a fact table, where each fact has a sale_number, and a sale_quantity, let's say. You also have a dimension table: Location, with the following hierarchy: continent -> country -> city. The grain in this case is the city. However, obviously, in each city there can be many sales.
Then, you browse the cube using the Location dimension, you'll see Continent/Country/City and in front of it there will be sum(sale_quantity) of all sales in the city.
My question is, if you wanna have a further browsing level, where the grain is a sale (So when you browse down to city, you wanna browse further and see quantity of each sale by itself), should you include the sale as a grain level in the dimension Location for that to be possible ?
Thank you.
Please can you clarify something about the grain level in dimensions.
Suppose you have a fact table, where each fact has a sale_number, and a sale_quantity, let's say. You also have a dimension table: Location, with the following hierarchy: continent -> country -> city. The grain in this case is the city. However, obviously, in each city there can be many sales.
Then, you browse the cube using the Location dimension, you'll see Continent/Country/City and in front of it there will be sum(sale_quantity) of all sales in the city.
My question is, if you wanna have a further browsing level, where the grain is a sale (So when you browse down to city, you wanna browse further and see quantity of each sale by itself), should you include the sale as a grain level in the dimension Location for that to be possible ?
Thank you.
alpha_a- Posts : 12
Join date : 2012-07-31
...Continued...
In the same topic, how do you 'browse by' fields of the fact table.
I've seen people in some instances create a dimension table based on the fact table, and then creating an attribute corresponding to each column in the fact table that they wanna use as a browsing dimension.
Is this the proper way to do it ?
thank you.
I've seen people in some instances create a dimension table based on the fact table, and then creating an attribute corresponding to each column in the fact table that they wanna use as a browsing dimension.
Is this the proper way to do it ?
thank you.
alpha_a- Posts : 12
Join date : 2012-07-31
Re: Novice question: grain level
you dont need to store the sales number in dimension table
you already have it in your fact table i.e.. sales number which is a Degenerate Dimension
sgudavalli- Posts : 29
Join date : 2010-06-10
Age : 40
Location : Pune, India
Re: Novice question: grain level
ok, but in this case you won't be able to browse down to the sale_number when you explore the cube...
alpha_a- Posts : 12
Join date : 2012-07-31
Re: Novice question: grain level
add fact table as a dimension table and relationship type should be a Fact Relationship Type
sgudavalli- Posts : 29
Join date : 2010-06-10
Age : 40
Location : Pune, India
Similar topics
» Novice Question on Dimension Hierarchy
» The grain level
» Finding the grain with One-To-Many fact tables.
» Grain present at every level of a dimension
» Distinct count at different level than the grain
» The grain level
» Finding the grain with One-To-Many fact tables.
» Grain present at every level of a dimension
» Distinct count at different level than the grain
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum