how to optimazing my calculated member in ssas

ZengDingding 26 Reputation points
2022-12-27T08:40:51.717+00:00

the calculated member is below,is there any problem,or how can I improve the performance,it need 30seconds to load , which is too long.

CREATE DYNAMIC SET CURRENTCUBE.[AdjProducts] as
Intersect (
nonempty(exists([Product].[Product Id].[Product Id], [Product].[Adj Flag].&[Y] ), [Measures].[current_sales])
,nonempty( [Product].[Product Id].[Product Id], [Measures].[last_sales])
) ;

CREATE MEMBER CURRENTCUBE.[Measures].[product_sales] as
sum( [AdjProducts], sum( head(
Order(
EXISTS( {ParallelPeriod([Date].[calendar].[year]
,1
,strtomember('[Date].[calendar].&[' + cstr([Measures].[start_date]) + ']'))
:ParallelPeriod([Date].[calendar].[year]
,1
,strtomember('[Date].[calendar].&[' + cstr([Measures].[start_date]) + ']')).lag(-120) }
,
,"Product_sales"
)
,[Measures].[datekey_sum]
, basc
)
, measures.days
)
,[sales] )) ,
NON_EMPTY_BEHAVIOR = { [sales] },
FORMAT_STRING = "#,##0.00;-#,##0.00", VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Product_sales';

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,344 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-12-28T07:12:44.963+00:00

    Hi @ZengDingding

    You can download an Analysis Services Performance Guide to find the appropriate optimization method for the part you want to optimize.details.aspx

    Based on the Chinese characters that appear in your question, I guess you may understand Chinese, and you can also refer to the optimization method in this link.6479539.html

    Best regards,
    Percy Tang

    ----------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.