Пример #1
0
    def test_calculated_member_lookup(self):
        calculated_member = CalculatedMember.lookup(
            "Period",
            "Period",
            "VersionAttribute1",
            cube="}ElementAttributes_Version",
            mdx_tuple=MdxTuple.of(Member.of("}ElementAttributes_Version", "Attribute1")))

        self.assertEqual(
            calculated_member.to_mdx(),
            "MEMBER [PERIOD].[PERIOD].[VERSIONATTRIBUTE1] AS [}ELEMENTATTRIBUTES_VERSION]."
            "([}ELEMENTATTRIBUTES_VERSION].[}ELEMENTATTRIBUTES_VERSION].[ATTRIBUTE1])")
Пример #2
0
    def test_calculated_member_lookup(self):
        calculated_member = CalculatedMember.lookup(
            "Period",
            "Period",
            "VersionAttribute1",
            cube="}ELEMENTATTRIBUTES_version",
            mdx_tuple=MdxTuple.of(
                Member.of("}ELEMENTATTRIBUTES_version", "Attribute1")))

        self.assertEqual(
            calculated_member.to_mdx(),
            "MEMBER [period].[period].[versionattribute1] AS [}elementattributes_version]."
            "([}elementattributes_version].[}elementattributes_version].[attribute1])"
        )