If you want to create a calculated member that intersects all measures, where do you put it and why?

If you want to create a calculated member that intersects all measures, where do you put it and why?

Asked on November 13, 2018 in SQL Server.
Add Comment


  • 3 Answer(s)

    • A member, based on other members can be created in MDX, . You can define two kinds of calculated members: ones that are measures and ones that are not.

    • A calculated measure is based on other measures. For example, one measure might be defined as a second measure divided by a third measure.

    • The phrase calculated measure is not a standard MDX phrase. Non-measure members are typically aggregated together by other non-measure calculated member.

    • Like other non-measure members, this calculated member is a group of records in the fact table.

    • For example, member A refers to 300 records in the fact table and member B refers to 150 records in the fact table. Suppose that you create a member C that aggregates A and B together. Then member C refers to the relevant 450 records in the fact table.

    • To create one or more calculated members within a query, use syntax as follows:

    WITH with_clause1 with_clause2 ... SELECT query_details
    

    Note: That do not include commas between the clauses.

    Where:

    •     Each expression with_clause1, with_clause2, and so on has the following syntax:
    MEMBER MEASURES.[new_measure_name] AS 'value_expression'
    
    •     query_details is your MDX query.
    Answered on November 13, 2018.
    Add Comment
    WITH MEMBER MEASURES.avgage AS 'MEASURES.[age]/MEASURES.[%COUNT]' 
    SELECT MEASURES.avgage ON 0, diagd.diagnoses.members ON 1 FROM demomdx
     
                                        avgage
    1 None                                33.24
    2 asthma                              34.79
    3 CHD                                 67.49
    4 diabetes                            57.24
    5 osteoporosis                        79.46
    Answered on January 14, 2019.
    Add Comment

    CREATE [ SESSION ] [HIDDDEN] [ CALCULATED ] MEMBER CURRENTCUBE | Cube_Name.Member_Name
    AS MDX_Expression
    [,Property_Name = Property_Value, …n]
    ……[,SCOPE_ISOLATION = CUBE]

    Answered on January 14, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.