dbTalk Databases Forums  

Formula error - no set holder when referencing a named <set>

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Formula error - no set holder when referencing a named <set> in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prasad
 
Posts: n/a

Default Formula error - no set holder when referencing a named <set> - 06-02-2005 , 09:31 PM






Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
  #2  
Old   
Chris Webb
 
Posts: n/a

Default RE: Formula error - no set holder when referencing a named <set> - 06-03-2005 , 05:29 AM






Hi Sam,

You're trying to create this calc in Analysis Manager, aren't you? As you've
probably found, the following works fine in MDX Sample App:

WITH MEMBER MEASURES.TEST AS 'IIF(INSTR(1, SETTOSTR(AXIS(0)), "[Gender]."),
"Y", "N")'
SELECT {GENDER.MEMBERS} ON 0,
[Marital Status].MEMBERS ON 1
FROM SALES
WHERE(MEASURES.TEST)

....but you can't just cut and paste the same calc definition into Analysis
Manager. This is, I think, because when you're creating a session scope calc
(which is what you're doing in Analysis Manager) rather than a query scope
calc, the AXIS(N) sets don't exist so the definition is invalid. You can get
round this quite easily though with a bit of late-binding; try using the
following definition:

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Quote:
Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
  #3  
Old   
Prasad
 
Posts: n/a

Default RE: Formula error - no set holder when referencing a named <set> - 06-03-2005 , 07:37 PM



Hi Chris,

Thanks for the reply. The solution you gave works nicely with 32 bit
Analysis Server.

But the issue is we are going into production with 64-bit Analysis Server
and it looks like the 64 bit does not support VBA functions.

Please suggest an alternative for functions like the "Instr" in the below
formula.

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

Everything else is standared MDX functions.

Thanks in advbance for your help,

Sam.
"Chris Webb" wrote:

Quote:
Hi Sam,

You're trying to create this calc in Analysis Manager, aren't you? As you've
probably found, the following works fine in MDX Sample App:

WITH MEMBER MEASURES.TEST AS 'IIF(INSTR(1, SETTOSTR(AXIS(0)), "[Gender]."),
"Y", "N")'
SELECT {GENDER.MEMBERS} ON 0,
[Marital Status].MEMBERS ON 1
FROM SALES
WHERE(MEASURES.TEST)

...but you can't just cut and paste the same calc definition into Analysis
Manager. This is, I think, because when you're creating a session scope calc
(which is what you're doing in Analysis Manager) rather than a query scope
calc, the AXIS(N) sets don't exist so the definition is invalid. You can get
round this quite easily though with a bit of late-binding; try using the
following definition:

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
  #4  
Old   
Chris Webb
 
Posts: n/a

Default RE: Formula error - no set holder when referencing a named <set> - 06-04-2005 , 04:23 PM



I'm fairly sure that the VBA library isn't supported on 64 bit. However I
know that in SP4 a number of VBA functions are now supported natively in MDX
(presumably for this very reason) - although I've not seen a definitive list
so I don't know if INSTR is one of them.

That said, I'm sure there will be a way of solving this problem without
using VBA functions. When I've got access to an AS box on Monday I'll try to
put together a solution and post it up here.

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Quote:
Hi Chris,

Thanks for the reply. The solution you gave works nicely with 32 bit
Analysis Server.

But the issue is we are going into production with 64-bit Analysis Server
and it looks like the 64 bit does not support VBA functions.

Please suggest an alternative for functions like the "Instr" in the below
formula.

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

Everything else is standared MDX functions.

Thanks in advbance for your help,

Sam.
"Chris Webb" wrote:

Hi Sam,

You're trying to create this calc in Analysis Manager, aren't you? As you've
probably found, the following works fine in MDX Sample App:

WITH MEMBER MEASURES.TEST AS 'IIF(INSTR(1, SETTOSTR(AXIS(0)), "[Gender]."),
"Y", "N")'
SELECT {GENDER.MEMBERS} ON 0,
[Marital Status].MEMBERS ON 1
FROM SALES
WHERE(MEASURES.TEST)

...but you can't just cut and paste the same calc definition into Analysis
Manager. This is, I think, because when you're creating a session scope calc
(which is what you're doing in Analysis Manager) rather than a query scope
calc, the AXIS(N) sets don't exist so the definition is invalid. You can get
round this quite easily though with a bit of late-binding; try using the
following definition:

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
  #5  
Old   
Chris Webb
 
Posts: n/a

Default RE: Formula error - no set holder when referencing a named <set> - 06-06-2005 , 05:30 AM



Well, I've got a solution:

WITH
MEMBER MEASURES.TEST AS 'NULL'
CELL CALCULATION DEMO FOR '({MEASURES.[TEST]})' AS '
AXIS(0).ITEM(0).ITEM(129-CALCULATIONCURRENTPASS()).DIMENSION IS [GENDER]
OR
CALCULATIONPASSVALUE(MEASURES.TEST, -1, RELATIVE)
', CALCULATION_PASS_NUMBER=129, CALCULATION_PASS_DEPTH=128, SOLVE_ORDER=2,
CONDITION='CALCULATIONCURRENTPASS()>(129-AXIS(0).ITEM(0).COUNT)'
SELECT CROSSJOIN([Customers].[(All)].MEMBERS,[Gender].MEMBERS) ON 0,
{MEASURES.TEST} ON 1
FROM SALES

Measures.Test returns 1 if Gender is on columns, and 0 if it isn't. It
relies on using calculated cells to perform an iteration over all the members
present in the first tuple in the AXIS(0) set. Not pleasant, but it's the
only way I can think of to do it without using any VBA functions...

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Chris Webb" wrote:

Quote:
I'm fairly sure that the VBA library isn't supported on 64 bit. However I
know that in SP4 a number of VBA functions are now supported natively in MDX
(presumably for this very reason) - although I've not seen a definitive list
so I don't know if INSTR is one of them.

That said, I'm sure there will be a way of solving this problem without
using VBA functions. When I've got access to an AS box on Monday I'll try to
put together a solution and post it up here.

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi Chris,

Thanks for the reply. The solution you gave works nicely with 32 bit
Analysis Server.

But the issue is we are going into production with 64-bit Analysis Server
and it looks like the 64 bit does not support VBA functions.

Please suggest an alternative for functions like the "Instr" in the below
formula.

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

Everything else is standared MDX functions.

Thanks in advbance for your help,

Sam.
"Chris Webb" wrote:

Hi Sam,

You're trying to create this calc in Analysis Manager, aren't you? As you've
probably found, the following works fine in MDX Sample App:

WITH MEMBER MEASURES.TEST AS 'IIF(INSTR(1, SETTOSTR(AXIS(0)), "[Gender]."),
"Y", "N")'
SELECT {GENDER.MEMBERS} ON 0,
[Marital Status].MEMBERS ON 1
FROM SALES
WHERE(MEASURES.TEST)

...but you can't just cut and paste the same calc definition into Analysis
Manager. This is, I think, because when you're creating a session scope calc
(which is what you're doing in Analysis Manager) rather than a query scope
calc, the AXIS(N) sets don't exist so the definition is invalid. You can get
round this quite easily though with a bit of late-binding; try using the
following definition:

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
  #6  
Old   
Prasad
 
Posts: n/a

Default RE: Formula error - no set holder when referencing a named <set> - 06-06-2005 , 09:54 AM



Hi Chris,

Thx again for the reply.

I learn that we can write UDF's in C++ and compile them using the 64-bit SDK.

I am not sure what the server (computer) needs in terms of software to
compile the code written in C++ as i am not a C++ developer. Do you have any
idea of doing this? It will be nice if you can refer me to some samples &
documentation on this.

Thanks,

Sam

"Chris Webb" wrote:

Quote:
Well, I've got a solution:

WITH
MEMBER MEASURES.TEST AS 'NULL'
CELL CALCULATION DEMO FOR '({MEASURES.[TEST]})' AS '
AXIS(0).ITEM(0).ITEM(129-CALCULATIONCURRENTPASS()).DIMENSION IS [GENDER]
OR
CALCULATIONPASSVALUE(MEASURES.TEST, -1, RELATIVE)
', CALCULATION_PASS_NUMBER=129, CALCULATION_PASS_DEPTH=128, SOLVE_ORDER=2,
CONDITION='CALCULATIONCURRENTPASS()>(129-AXIS(0).ITEM(0).COUNT)'
SELECT CROSSJOIN([Customers].[(All)].MEMBERS,[Gender].MEMBERS) ON 0,
{MEASURES.TEST} ON 1
FROM SALES

Measures.Test returns 1 if Gender is on columns, and 0 if it isn't. It
relies on using calculated cells to perform an iteration over all the members
present in the first tuple in the AXIS(0) set. Not pleasant, but it's the
only way I can think of to do it without using any VBA functions...

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Chris Webb" wrote:

I'm fairly sure that the VBA library isn't supported on 64 bit. However I
know that in SP4 a number of VBA functions are now supported natively in MDX
(presumably for this very reason) - although I've not seen a definitive list
so I don't know if INSTR is one of them.

That said, I'm sure there will be a way of solving this problem without
using VBA functions. When I've got access to an AS box on Monday I'll try to
put together a solution and post it up here.

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi Chris,

Thanks for the reply. The solution you gave works nicely with 32 bit
Analysis Server.

But the issue is we are going into production with 64-bit Analysis Server
and it looks like the 64 bit does not support VBA functions.

Please suggest an alternative for functions like the "Instr" in the below
formula.

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

Everything else is standared MDX functions.

Thanks in advbance for your help,

Sam.
"Chris Webb" wrote:

Hi Sam,

You're trying to create this calc in Analysis Manager, aren't you? As you've
probably found, the following works fine in MDX Sample App:

WITH MEMBER MEASURES.TEST AS 'IIF(INSTR(1, SETTOSTR(AXIS(0)), "[Gender]."),
"Y", "N")'
SELECT {GENDER.MEMBERS} ON 0,
[Marital Status].MEMBERS ON 1
FROM SALES
WHERE(MEASURES.TEST)

...but you can't just cut and paste the same calc definition into Analysis
Manager. This is, I think, because when you're creating a session scope calc
(which is what you're doing in Analysis Manager) rather than a query scope
calc, the AXIS(N) sets don't exist so the definition is invalid. You can get
round this quite easily though with a bit of late-binding; try using the
following definition:

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
  #7  
Old   
Chris Webb
 
Posts: n/a

Default RE: Formula error - no set holder when referencing a named <set> - 06-06-2005 , 10:01 AM



Yes, that sounds like it could be another option but since I'm not a C++
developer either, I can't help you I'm afraid.

Chris
--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Quote:
Hi Chris,

Thx again for the reply.

I learn that we can write UDF's in C++ and compile them using the 64-bit SDK.

I am not sure what the server (computer) needs in terms of software to
compile the code written in C++ as i am not a C++ developer. Do you have any
idea of doing this? It will be nice if you can refer me to some samples &
documentation on this.

Thanks,

Sam

"Chris Webb" wrote:

Well, I've got a solution:

WITH
MEMBER MEASURES.TEST AS 'NULL'
CELL CALCULATION DEMO FOR '({MEASURES.[TEST]})' AS '
AXIS(0).ITEM(0).ITEM(129-CALCULATIONCURRENTPASS()).DIMENSION IS [GENDER]
OR
CALCULATIONPASSVALUE(MEASURES.TEST, -1, RELATIVE)
', CALCULATION_PASS_NUMBER=129, CALCULATION_PASS_DEPTH=128, SOLVE_ORDER=2,
CONDITION='CALCULATIONCURRENTPASS()>(129-AXIS(0).ITEM(0).COUNT)'
SELECT CROSSJOIN([Customers].[(All)].MEMBERS,[Gender].MEMBERS) ON 0,
{MEASURES.TEST} ON 1
FROM SALES

Measures.Test returns 1 if Gender is on columns, and 0 if it isn't. It
relies on using calculated cells to perform an iteration over all the members
present in the first tuple in the AXIS(0) set. Not pleasant, but it's the
only way I can think of to do it without using any VBA functions...

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Chris Webb" wrote:

I'm fairly sure that the VBA library isn't supported on 64 bit. However I
know that in SP4 a number of VBA functions are now supported natively in MDX
(presumably for this very reason) - although I've not seen a definitive list
so I don't know if INSTR is one of them.

That said, I'm sure there will be a way of solving this problem without
using VBA functions. When I've got access to an AS box on Monday I'll try to
put together a solution and post it up here.

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi Chris,

Thanks for the reply. The solution you gave works nicely with 32 bit
Analysis Server.

But the issue is we are going into production with 64-bit Analysis Server
and it looks like the 64 bit does not support VBA functions.

Please suggest an alternative for functions like the "Instr" in the below
formula.

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

Everything else is standared MDX functions.

Thanks in advbance for your help,

Sam.
"Chris Webb" wrote:

Hi Sam,

You're trying to create this calc in Analysis Manager, aren't you? As you've
probably found, the following works fine in MDX Sample App:

WITH MEMBER MEASURES.TEST AS 'IIF(INSTR(1, SETTOSTR(AXIS(0)), "[Gender]."),
"Y", "N")'
SELECT {GENDER.MEMBERS} ON 0,
[Marital Status].MEMBERS ON 1
FROM SALES
WHERE(MEASURES.TEST)

...but you can't just cut and paste the same calc definition into Analysis
Manager. This is, I think, because when you're creating a session scope calc
(which is what you're doing in Analysis Manager) rather than a query scope
calc, the AXIS(N) sets don't exist so the definition is invalid. You can get
round this quite easily though with a bit of late-binding; try using the
following definition:

IIF(INSTR(1, SETTOSTR(STRTOSET("AXIS(0)")), "[Gender]."), "Y", "N")

HTH,

Chris

--
Blog at:
http://spaces.msn.com/members/cwebbbi/


"Prasad" wrote:

Hi,

I just want to find out whether a particular dimension say "Gender" is
selected as a ROW or COLUMN dimension.

I tried these two opions and got the same error.

Unable to update the calculated member.
Formula error - no set holder when referencing a named <set>.

Sample 1:

InStr(1, SetToStr(Axis(0)), "[Gender]." )

Sample 2:

Iif(InStr(1, SetToStr(Axis(0)) ) , "[Gender].", "Selected", "Not Selected")

Please help with the syntax,

Thx

Sam.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.