Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

If Member belongs with MDX Function Descendants

$
0
0

I need to check whether a member belongs to a sublevel, and then use the criteria to divide it.

Iif
        ([Curso].[Curso].CurrentMember IS [Curso].[Curso].&[ENFERMAGEM]
         OR
         [Curso].[Curso].CurrentMember IS [Curso].[Curso].&[ENFERMAGEM - MOSSORÓ]
            ,(
                (
                [Teacher And Payroll Taxes Teacher SEM PRECEPTORIA] 
                / Iif(  Descendants([Curso].[Curso].CurrentMember, [Curso].[Modalidade], SELF) is [Curso].[Modalidade].&[GRAD]
                        , ([Measures].[CH Ead Total GRAD]+[Measures].[CH Pratica Total GRAD]+[Measures].[CH Teorica Total GRAD])
                        , Iif(  Descendants([Curso].[Curso].CurrentMember, [Curso].[Modalidade], SELF) is [Curso].[Modalidade].&[GEX]
                                , ([Measures].[CH Ead Total GEX]+[Measures].[CH Pratica Total GEX]+[Measures].[CH Teorica Total GEX])
                                , ([Measures].[CH Ead Total EAD]+[Measures].[CH Pratica Total EAD]+[Measures].[CH Teorica Total EAD])
                                )
                        )
                )
                * ([Measures].[CH Pratica] + [Measures].[CH Teorica])
            )+[Measures].[Servicos Preceptoria Rateado] 
            ,(
                (
                [Teacher And Payroll Taxes Teacher SEM PRECEPTORIA] 
                / Iif(  Descendants([Curso].[Curso].CurrentMember, [Curso].[Modalidade], SELF) is [Curso].[Modalidade].&[GRAD]
                        , ([Measures].[CH Ead Total GRAD]+[Measures].[CH Pratica Total GRAD]+[Measures].[CH Teorica Total GRAD])
                        , Iif(  Descendants([Curso].[Curso].CurrentMember, [Curso].[Modalidade], SELF) is [Curso].[Modalidade].&[GEX]
                                , ([Measures].[CH Ead Total GEX]+[Measures].[CH Pratica Total GEX]+[Measures].[CH Teorica Total GEX])
                                , ([Measures].[CH Ead Total EAD]+[Measures].[CH Pratica Total EAD]+[Measures].[CH Teorica Total EAD])
                                )
                        )
                )
                * ([Measures].[CH Pratica] + [Measures].[CH Teorica])
            )
        )

But this was not working. Does anyone know how I get the result I expect?

Maybe with other MDX function.


Nayron Araújo - Desenvolvedor BI - Setor de TI - Universidade Potiguar - UnP



Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>