locked
Student Help RRS feed

  • Question

  • I'm a student and I recently took a class on Business Intelligence Tools using SSAS.

    I built a cube and I want to predict what factors lead students to become inactive (drop out/stop out).

    I have a table I'm calling DimStudent with the following columns:

    S_ID (Student ID)

    SEX

    STUDENT_STATUS

    UNDERREPRSENTED

    All but S_ID are Boolean values with an integer flag of either 0 or 1.

    I also have calculated members, and I'm not sure what I'm doing wrong with the MDX scripting here but I keep getting errors for the [Inactive Students] calculated member.

    My calculated members are: [Total Students] expression DISTINCT COUNT(S_ID)

    [Active Students] expression SUM(STUDENTS_STATUS) 1 in this Boolean data type = Active

    [Inactive Students] expression [Total Students] - [Active Students]

    I know that because [Inactive Students] is based on other calculated members it has to be created last.  I've tried that along with other expressions for the MDX script but am not having any luck.  Any help is greatly appreciated.

    Saturday, April 12, 2014 3:10 AM

Answers

  • First, I understood that DimStudent is a dimension as its name started with Dim(which is the common naming convention for dimensions), but also I felt that you are dealing with it more like a fact ... so I think you have to review your cube design.

    Second, I think that "[Total Students] expression DISTINCT COUNT(S_ID)"  will most probably gives you an error as DISTINCT function expects a tuple set and you are providing integer (or maybe string!). Try to use DISTINCTCOUNT instead. DISTINCTCOUNT which is a function that evaluates tuples, removes those associated with empty cells in the fact, removes duplicates, and then performs a count. Try this [Total Students] expression DISTINCT COUNT([DimStudent].[S_ID].children).

    Third, "[Active Students] expression SUM(STUDENTS_STATUS)" most probably will give you null (based on what do you have in your fact); so [Invative Student] will always = [Total Students]!, this is why you have to review your cube design. And just to remind you:
    Sum( {Set} [, Expression]), The first argument of the Sum function is a set of tuples. The function works by resolving each tuple to a value using the supplied expression or the current measure and then adding these values.

    -------------------------------------------------------------------------------------------------------------------------Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers.

    • Proposed as answer by Charlie Liao Monday, April 14, 2014 7:25 AM
    • Marked as answer by Charlie Liao Sunday, April 20, 2014 2:09 PM
    Saturday, April 12, 2014 6:45 AM