SSAS : Calculated Member based on a condition in the same row -
i have fact table
i want create calculated member : s = sum of "tot_liv" have "num_prod" = 1
for example:
s should equal 50
how ?
assuming have measure defined on fact table named "tot liv", measure has "sum" defined aggregate method, , num_prod
foreign key dimension named prod
having attribute named num prod
assume being based on primary key of dimension, , hence 1 records references num_prod
primary key, use
([measures].[tot liv], [prod].[num prod].[1])
you see there no 1:1 translation sql mdx, lot of things depend on cube setup, predefines many behaviors have repeat again , again in sql queries (like usage of sum
).
Comments
Post a Comment