Forum Discussion

craig_wilson's avatar
craig_wilson
Frequent Visitor
10 years ago

SASS Mutidimensional import Extremely slow

Hi All,

 

I am connecting to a Multimdimensioal SSAS cube from within Power BI desktop and I am attempting to import a single column from 3 dimensions, one of them is the date dimension, and a single measure from a fact table. The cube is a traditional star schema and contains no M:N relationships, so it is very simplistic.

 

However filtering the date dimension to a particular day and importing the data takes well over 10 minutes, however doing this in Excel or SSMS takes 2 seconds at most. I ran SQL Server Profiler and the MDX that is produced by Power BI is extremely inefficient with crossjoins all over.

 

This makes it pretty much useless for our end users to pull this simple data in to then join and analyse with other data.

 

I raised an issue with MS but they have stated that it is not a break/fix issue so they can't do anything with it. Has anyone any suggestions on how to make this quicker?

 

I have included both MDX scripts below.

 

Thanks

 

 

7 Replies

  • craig_wilson's avatar
    craig_wilson
    Frequent Visitor

    Power BI:

    SELECT
        {[Measures].[EOD Market Val - GBP]}ON 0,
        SUBSET(
            NONEMPTY(
                CROSSJOIN(
                    CROSSJOIN([Date].[Date].[Date].ALLMEMBERS,[Fund].[Fund Code].[Fund Code].ALLMEMBERS),
                    [Instrument].[Instrument Parent Type].[Instrument Parent Type].ALLMEMBERS),
                {[Measures].[EOD Market Val - GBP]}),0,4096)PROPERTIES MEMBER_CAPTION,MEMBER_UNIQUE_NAME ON 1
    FROM
        (
            SELECT FILTER(
                CROSSJOIN(
                    CROSSJOIN([Date].[Date].[Date].ALLMEMBERS,[Fund].[Fund Code].[Fund Code].ALLMEMBERS),
                    [Instrument].[Instrument Parent Type].[Instrument Parent Type].ALLMEMBERS),
                    (
                        (
                            (ISEMPTY(
                                [Date].[Date].CURRENTMEMBER.MEMBER_CAPTION)
                                OR
                                ISEMPTY("09-06-2016")
                            )AND
                            (ISEMPTY(
                                [Date].[Date].CURRENTMEMBER.MEMBER_CAPTION)
                                AND
                                ISEMPTY("09-06-2016")
                            )
                        )
                        OR
                        (
                            NOT(
                                (ISEMPTY([Date].[Date].CURRENTMEMBER.MEMBER_CAPTION)
                                OR
                                ISEMPTY("09-06-2016")
                            )
                        )
                        AND
                        (
                            [Date].[Date].CURRENTMEMBER.MEMBER_CAPTION = "09-06-2016")
                        )
                    )
                )
            ON 0
        FROM
            [CUBE]
        )CELL PROPERTIES VALUE

     

    SSMS:

     SELECT
        NON EMPTY { [Measures].[EOD Market Val - GBP] } ON COLUMNS,
        NON EMPTY { ([Fund].[Fund Code].[Fund Code].ALLMEMBERS * [Instrument].[Instrument Parent Type].[Instrument Parent Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM
        (
            SELECT ( { [Date].[Date].&[20160609] } ) ON COLUMNS
            FROM [CUBE]
        )
    WHERE
        ( [Date].[Date].&[20160609] ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

  • gooranga1's avatar
    gooranga1
    Power Participant

    SSMS:

    Not sure about the top one but have you tried some extra {} around your dimension attributes? I had a similar issue with an mdx query and it was the way I was selecting the dimension attrbutes.

     

    SELECT
        NON EMPTY { [Measures].[EOD Market Val - GBP] } ON COLUMNS,
        NON EMPTY {{ ([Fund].[Fund Code].[Fund Code].ALLMEMBERS} * {[Instrument].[Instrument Parent Type].[Instrument Parent Type].ALLMEMBERS ) } }DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM
        (
            SELECT ( { [Date].[Date].&[20160609] } ) ON COLUMNS
            FROM [CUBE]
        )
    WHERE
        ( [Date].[Date].&[20160609] ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS