Hi All,
I have a requirement to use set expression based on condition. Is this possible?
For example, if (caption([selected_value])='A') then (set(C,D))
else (set(E,F))
It is throwing error. ANy guidance?
Quote from: twister on 13 Jan 2014 11:00:00 AM
It is throwing error. ANy guidance?
...and the error is?????? :)
If I had to guess I'd wager that it is saying your condition needs to return a single item? You could perhaps try adding query items for each of the two sets, and referring to these in your expression? I'm guessing, though. Until you tell us what the error is that's all anyone will be able to do...
MF.
Sorry mate. The error is,
XQE-PLN-0093
The query is not supported. The argument at position 2 of 'if' from the data item 'Region or Country' cannot be coerced into a 'Value' expression.
Thanks.
This is DQM and I have put the set expressions as data items and referring the data items in the condition.
Oh ok - a coercion error. What is [selected_value] defined as? According to your expression it should be a level or a member or a set. What is it actually?
Cheers!
MF.
if (caption([BI_Reporting].[BI_Store].[BI_Store] -> ?pStore?)='aaaa')
then ([DATAITEM_SET1])
ELSE ([DATAITEM_SET2])
Long time but ended with the same problem...This is disallowed in DQM. I get a coercion error when I use the following in DQM.
if (caption([BI_Reporting].[BI_Store].[BI_Store] -> ?pStore?)='aaaa')
then ([DATAITEM_SET1])
ELSE ([DATAITEM_SET2])
This is working fine with CQM. For DQM, I am planning to have 2 dataitems (one for assigning text and the second one to pickup the value of the first text using macro). However, struggling with the second data item with the macro.
The first dataitem will look something like this,
if (caption([BI_Reporting].[BI_Store].[BI_Store] -> ?pStore?)='aaaa')
then ('DATAITEM_SET1')
ELSE ('DATAITEM_SET2')
the second dataitem would be like #sb('DATAITEM1')#...Any help would be much appreciated?
Any idea COgnos Paul? Basically I want to pass dataitem inside a macro. Is this possible?
#sb('DATAITEM1')#