June 12, 2015 at 4:19 pm
I have a cube for counting # of members in different ways. The measure is "Member Count", which is the count of records. I have two choices for creating the measure.
Choice 1: In the fact table, create an integer column MemberCounter with default value as 1, and create the measure as the Sum() for MemberCounter;
Choice 2: just create the measure as the Count() for any non-null column (like the Date column).
I wonder which one is better performance-wise.
July 2, 2015 at 12:50 pm
seaport (6/12/2015)
I have a cube for counting # of members in different ways. The measure is "Member Count", which is the count of records. I have two choices for creating the measure.Choice 1: In the fact table, create an integer column MemberCounter with default value as 1, and create the measure as the Sum() for MemberCounter;
Choice 2: just create the measure as the Count() for any non-null column (like the Date column).
I wonder which one is better performance-wise.
I don't think you'll see much difference performance-wise between count() and sum(). For your purposes however, you may need to count unique members only (depending on your fact table's grain)...and Option 1 would not work in that case.
July 6, 2015 at 8:22 am
Martin,
Thanks for the response.
I do not think there is much performance difference between count() and sum() either.
I do need an additional measure - Distinct Count of Member ID. If I understand correctly, with either a Sum() measure or a Count() measure in the cube, this measure can be created. Some people suggest putting Distinct Count in its own measure group for performance reason.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply