Question for count in fact table
2 posters
Page 1 of 1
Question for count in fact table
This is for course registration. I have students which register for courses, but the IR person was wanting a field on the fact table for reporting in Cognos, and this field would just have a 1 in it. I do not agree with doing this because you can just count distinct student identifiers. I could have a count 1 or 0 for if they should be counted as enrolled in the course, but I have a 'Y' or 'N' indicator in the registration status dimension for enrollment...what do you guys think? I dont really like saying things in multiple places...or in different ways within the same grain, but I see this as a future aggregation on registration to get the subset of "enrolled" students. I am open to opinions.
chade25- Posts : 29
Join date : 2012-04-12
Age : 44
Location : Oregon
Re: Question for count in fact table
It depends on the nature of the fact table. Most front-end tools allow you to define column expressions, doing a count versus summing a bunch of 1's makes no difference in how the query performs.
The times when I have found a count column useful is when you have transactions that initiate, adjust and terminate a status. In such cases, the column would have values of 1, 0, and -1 depending on the transaction. This allows you to easily calculate a count without having to interpret the nature of the transaction.
The times when I have found a count column useful is when you have transactions that initiate, adjust and terminate a status. In such cases, the column would have values of 1, 0, and -1 depending on the transaction. This allows you to easily calculate a count without having to interpret the nature of the transaction.
Similar topics
» Finding the grain with One-To-Many fact tables.
» Is it possible to get a distinct order count with a transaction line sales fact table?
» New to DW and question about fact table
» Retail Point of Sale Fact Table Question
» Multiple measures in a fact table- modelling question
» Is it possible to get a distinct order count with a transaction line sales fact table?
» New to DW and question about fact table
» Retail Point of Sale Fact Table Question
» Multiple measures in a fact table- modelling question
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum