how to count in ssas?

vava-8173 40 Reputation points
2023-05-04T07:34:44.12+00:00
Hi.
I have such a TSQL query.
select count(*)over(partition by clrgroup) as clrcounts from dbo.DimAdress
Now the question is how do I achieve the same in SSAS.
Thanks.
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
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-05-04T08:08:31.58+00:00

    Hi @vava

    In TSQL, the role of this query is to count the number of group members by grouping.

    In SSAS, there is also MDX with a similar effect.

    This thread may be able to help you.

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b179a467-0e92-4d33-aee9-a85fe1e5e116/ssas-2008-mdx-how-to-count-members-in-dimension?forum=sqlanalysisservices

    Best regards,

    Percy Tang


    If the answer is the right solution, please click "Accept Answer". 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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.