SQLServerCentral » SQL Server 2005 » Business Intelligence » Calculate measures and mdxInstantForum 2016-2 FinalSQLServerCentralhttps://www.sqlservercentral.com/Forums/SQLServerCentralThu, 27 Apr 2017 07:27:44 GMT20Calculate measures and mdxhttps://www.sqlservercentral.com/Forums/FindPost1489876.aspxIn cognos, we have complex measures calculated by joining multiple tables, and we can see the SQL queries in IQD files. How do I do this in ssas to build cubes? Anywhere in ssas we can view the underlying queries? My confusion is between measure calculations and mdx queries. For example, I need to calculate gross shipped dollars, do I calculate it in measure calculation or mdx?Thu, 12 Sep 2013 16:39:54 GMTshanghaigirl-1125377RE: Calculate measures and mdxhttps://www.sqlservercentral.com/Forums/FindPost1494399.aspxYou can use SQl server 2008 Report server project and create a new datasource pointing to the required cube. Click on Query Designer and it would give you the browser screen of the cube. Drag and drop the necessary fields and filters if necessary. Once you click OK, then you could see the underlying MDX query.Thu, 12 Sep 2013 16:39:54 GMTsrini.msbi8RE: Calculate measures and mdxhttps://www.sqlservercentral.com/Forums/FindPost1494033.aspxThere are two parts to your question, if I understand it correctly
1. You can always use the the standard DMV's to see the formula and the MDX used to define any calculated members. One such is $system.mdschema_measures. Also, you can open the calculations tab and view the MDX for the measures.
2. For gross shipped dollars, this is a fully additive measure and you should be using a SUM() function on the column to calculate the measureThu, 12 Sep 2013 01:57:00 GMTRaunak Jhawar