|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Today @ 6:41 AM
Points: 51,
Visits: 91
|
|
Hi to all. I write this topic because i need an help about MDX and how to use VB Functions to use together MDX.
My MDX Query example :
SELECT ([Marca_Modello].[Codice Merceologia].[All Marca_Modello].[MM0202xx]) ON COLUMNS, [Measures].[Importo Venduto] ON ROWS
FROM Vendite
WHERE [Anno].[All Anno].[2012]
This query MDX works but i need to do more with VB Functions i think... I'd like to do more because to hve members that begins with 'MI' that is...
([Marca_Modello].[Codice Merceologia].[All Marca_Modello].[MM0202xx])
--> Begins with word 'MI
So i'd like to have members ..like that. MI01010 MI020304 MI MI02 and not only equal to a string ....
Is this possibile with VB Functions ????
Any suggest or idea ??? Sorry first time i need that...using MDX.
Good week to all members of this wonderful Forum
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 3:16 AM
Points: 117,
Visits: 459
|
|
Try something like
with set [MIs] as Filter([Marca_Modello].[Codice Merceologia].Members ,Left([Marca_Modello].[Codice Merceologia].[All Marca_Modello].CurrentMember.Name,2) = "MI")
SELECT [MIs] ON COLUMNS,
[Measures].[Importo Venduto] ON ROWS
FROM Vendite
WHERE [Anno].[All Anno].[2012]
Mack
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Today @ 6:41 AM
Points: 51,
Visits: 91
|
|
Thanks MACK very kind of you !!! I test immediately...i read about LEFT VBA FUNCTION but i was not able to understand to use properties Name. I have to put that set in a Excel 2013. Will see..wait for my response.
However THANKS A LOT !!!!
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Today @ 6:41 AM
Points: 51,
Visits: 91
|
|
Ciao Mackers...sorry if i disturb you again. I tested your set but i receive an error that tell that: i TRANSLATE from italian,...
IT IS EXPECTED A HIERARCHY EXPRESSION INSTEAD YOU DID A MEMBER EXPRESSION...
So i discover with your help , the error...
Syntax correct is without .[All Marca_Modello] ...(you could not know extacly my dimensions and their attributes ) that is...:
with set [MIs] as Filter([Marca_Modello].[Codice Merceologia].Members ,Left([Marca_Modello].[Codice Merceologia].CurrentMember.Name,2) = "MI")
SELECT [MIs] ON COLUMNS,
[Measures].[Importo Venduto] ON ROWS
FROM Vendite
WHERE [Anno].[All Anno].[2012]
Sincere thankings to you... !!!!!!!!!!!!
PS. Now i know i have to use also VB Functions....with MDX...
Thanks again...
|
|
|
|