I've been trying to learn SSAS Cubes and MDX. So far I have managed to create a cube that returns the correct data/calculations when viewed through the cube browser.
The Query Builder was used to build a query in reporting services to query the cube, I've looked at the MDX this generated and pulled out the stuff that doesn't seem to make a difference to the actual results. The query looks like this:
SELECT NON EMPTY { [Measures].[AverageConnectedSeconds] } ON COLUMNS,
NON EMPTY { ([Operator].[ACCESS DEF].[ACCESS DEF].ALLMEMBERS * [Calls].[Notification Time Bands].[Notification Time Bands].ALLMEMBERS) } ON ROWS
FROM ( SELECT ( -{ [Calls].[Notification Time Bands].&[0] } ) ON COLUMNS
FROM ( SELECT ( { [Calls].[Incoming YN].[N] } ) ON COLUMNS
FROM ( SELECT ( -{ [Calls].[Entity Type].&[6] } ) ON COLUMNS
FROM ( SELECT ( -{ [Calls].[Reason Text].&[Background Call] } ) ON COLUMNS
FROM ( SELECT ( { STRTOMEMBER(@OperatorId) } ) ON COLUMNS
FROM [PNC5data] )))))
I've read up on the Syntax and I THINK I understand why the query is doing nested selects. Am I right in understanding that the nested SELECT FROM's are acting as a WHERE clause would in SQL?
If so: What is the WHERE clause used for in MDX and when/why would I use one?
If anyone is able to give me a breakdown of what is actually happening in this query I'd really appreciate it! Or if you're able to direct me to a resource I could further my understanding of MDX, I'd be greatful!
Thanks,
James