What is the equivalent of PARTITION BY in SSAS (MDX)

Lisa Kruger 60 Reputation points
2023-03-02T16:52:28.03+00:00

Hi All,

I can do

SELECT COUNT(ID) OVER(PARTITION BY CLAIMDESCR) AS CLAIMCNT

How can I achieve the same in SSAS on a single DIMENSION or multiple Dimensions?

Thanks

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,366 questions
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,263 questions
{count} votes

2 answers

Sort by: Most helpful
  1. PercyTang-MSFT 12,426 Reputation points Microsoft Vendor
    2023-03-03T06:33:09.7633333+00:00

    Hi @Lisa Kruger

    You can refer to this link, it may be helpful for the problem you are experiencing.

    https://stackoverflow.com/questions/54262256/ssas-mdx-calculated-measure-count-of-items-item-grouped-items-item-grou

    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.


  2. PercyTang-MSFT 12,426 Reputation points Microsoft Vendor
    2023-03-08T03:01:08.65+00:00

    Hi @Lisa Kruger

    How about this link case? The problem inside is very similar to yours.

    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.

    0 comments No comments