Question for count in fact table

View previous topic View next topic Go down

Question for count in fact table

Post  chade25 on Mon Mar 04, 2013 2:25 pm

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 : 37
Location : Oregon

View user profile

Back to top Go down

Re: Question for count in fact table

Post  ngalemmo on Mon Mar 04, 2013 3:19 pm

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.
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum