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

MDX for Inner Join and MAX function

$
0
0

Hi,

I have a SQL query for which i need MDX.

SELECT count(*), sum(balance) FROM SerialBalance b WHERE balance > 0 AND EffectiveDate = ( Select Max(EffectiveDate) From SerialBalance sb Where SB.Subhead = b.Subhead and SB.SerialNumber = b.SerialNumber and SB.Branch = b.Branch and SB.Zone = b.Zone and SB.Country = b.Country and SB.EffectiveDate <= '2013-05-31' )

I have dimension SerialBalance. I also have time dimension attached with EffectiveDate in this table. Please help as i simply got now clue on how to handle this query.

Much Appreciated

Nauman


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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