Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX Query To get aggreate value of rows based on two dimensions.

$
0
0

Hi,

Am trying to write a query which gives me a column with aggration of values in a column based on two dimensions

Eg: Below is the SQL Query I want to use it as expression in CUBE.

SUM(A1) + SUM(case when CAT IN ('ind', 'med', 'EXP', 'LEG') then res else 0 end) as total   from XYZ

A1 is the column name With datatype decimal .  CAT is a column name with datatype (char). XYZ is the table name and this table consists of all three columns. i have them in the cube as fact and dimension.

Can anyone plz help me write the MDX expression.

Thanks


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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