SSAS : Calculated Member based on a condition in the same row -


i have fact table

enter image description here

i want create calculated member : s = sum of "tot_liv" have "num_prod" = 1

for example:

enter image description here

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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -