Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

SQL OR with MDX Expand / Collapse
Posted Friday, February 14, 2014 6:44 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, October 21, 2015 2:55 AM
Points: 58, Visits: 300
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
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 951, Visits: 1,793
You can put this into the Where condition in a query for a simple solution. For example in AdventureWorks this:
NON EMPTY [Measures].[Reseller Sales Amount] ON 0,
[Geography].[State-Province].[State-Province] ON 1

[Adventure Works]


...would give you reseller sales in New York or South Dakota.

I'm on LinkedIn
Post #1542186
Posted Wednesday, March 5, 2014 10:51 AM



Group: General Forum Members
Last Login: Monday, November 16, 2015 9:32 PM
Points: 108, Visits: 416
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:

I 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
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse