Hi guys,
I have a simple question, I am building an information map based on a cube.
In the cube, there is a dimension named "District Level". In the expression tab, it's showing "<<District Level.District Level>>". I want to apply some filter on it (with MDX).
for example, the value in the data are
0000
1000
2000
3000
4000
5000
I want to select all records between 1000 to 4000 (exclude those < 1000 and those > 4000 ie. 0000, 5000 in this case).
How should I write the MDX? I tried lots of things but can't make it works.
Any idea is very helpful to me. Thx in advance.
I would take a look at the documentation on filtering at http://support.sas.com/documentation/cdl/en/citug/61084/HTML/default/viewer.htm#p1508ri6xxyeu9n1b8w4....
Hi Yu,
there is not much out there on MDX in SAS so you can start looking or posting in the Microsoft boards.
Using the range function works for me but I dont know if this is what you need.
MDX Range:
SELECT
{
[DIM_PERIODE].[Hierarchy1].[All Hierarchy1].[2005] : [DIM_PERIODE].[Hierarchy1].[All Hierarchy1].[2009]
} ON 0,
[DIM_JPI].[All DIM_JPI].Children ON 1
FROM mycue
--------------------------------
If you need a bit more complex logic like <= then I would use a filter:
http://msdn.microsoft.com/en-us/library/ms145502.aspx
Regarding the example, I did not get it to work apart from filtering with measures (SAS OLAP).
I dont even know if it works with normal dimension members.
@TSBruce, the documentation has nothing to do with MDX. Why not filter in MDX instead of loading lots of unused data into dataset
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.