Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 SQL OR with MDX Rate Topic Display Mode Topic Options
Author
 Message
 Posted Friday, February 14, 2014 6:44 AM
 Valued Member Group: General Forum Members Last Login: Saturday, March 08, 2014 9:45 AM Points: 53, Visits: 209
 I have a Measure called Supplier Number in the cube. The Supplier table acts as a Dimension as well as Fact table in the Cube. There are two dimensions - CreationDate and Modification date that are linked to Supplier fact table.My requirement is to get the Supplier Number which got Created (CreationDate) or which got modified (Modification date) for any current month selected. How to achieve this in MDX? Hint: This is like a SQL OR condition with CreationDate and Modification Date.
Post #1541575
 Posted Monday, February 17, 2014 9:08 AM
 Old Hand Group: General Forum Members Last Login: Yesterday @ 3:43 AM Points: 390, Visits: 701
 You can put this into the Where condition in a query for a simple solution. For example in AdventureWorks this:SELECTNON EMPTY [Measures].[Reseller Sales Amount] ON 0,[Geography].[State-Province].[State-Province] ON 1FROM[Adventure Works]WHERE{[Geography].[Geography].[State-Province].&[NY]&[US],[Geography].[Geography].[State-Province].&[SD]&[US]}...would give you reseller sales in New York or South Dakota. I'm on LinkedIn
Post #1542186
 Posted Wednesday, March 05, 2014 10:51 AM
 SSC Journeyman Group: General Forum Members Last Login: Friday, April 11, 2014 7:44 AM Points: 96, Visits: 346
 If you are pulling the data from a Cube, then MDX. If you are pulling from SQL Database, then SQL. If you are going to be working a lot with cubes, I highly recommend learning MDX. It's quite easy to learn, it just messes with your head if you think in SQL terms (two dimensions). An awesome book to learn from is: http://www.amazon.com/Practical-MDX-Queries-Microsoft-Analysis/dp/0071713360/ref=sr_1_1?ie=UTF8&qid=1394041795&sr=8-1&keywords=mdxI sat down the whole weekend and read through the book, and became pretty good at writing MDX by monday. This book walks you thought examples, which is quite easy to learn from. ------------:)
Post #1547936

 Permissions