Hello,
I have some trouble with a singleton.
I have a data item in a singleton. If the data item is like that : "total(currentMeasure within set [Dimension1])" It works.
But if I put that :
"total(currentMeasure within set [Dimension1])-total(currentMeasure within set [Dimension1],[Dimension2].[Member1]" the cell is blank
What is wrong ?
It looks like you're trying to subtract Dim2.Member1 from the total.
Everything after the "within set" needs to be a set expression. Since Cognos doesn't support tupling sets, you need to put the tuple on something else.
currentMeasure can be part of a tuple:
total(tuple(currentMeasure,[Member]) within set [Data Item1])
Thanks for your answer.
Whats in your dataitem1 ?
What should be the complete expression to get the result of [DIMENSION1].[Category1] minus [DIMENSION2].[Member1] for measure [cost_monthly_actuals] ?
I wrote :
total(tuple([cost_monthly_actuals],[DIMENSION1].[CATEGORY1]))-
total(tuple([cost_monthly_actuals],[DIMENSION2].[Member1]) within set[DIMENSION1].[CATEGORY1])
But the cell is blank
The member summary total() needs to use set expressions.
total([value expression] within set [set expression])
The value expression can be a tuple, a measure, the currentMeasure function, or even a static value. The set expression can be any expression that returns a set of members. Examples being, children([2011]) or set([2009],[2010],[2011]) or [Cube].[Dim].[Level].
Are you using a dimensional datasource or a relational datasource?
Hello,
My model is a DMR.
I use set expression but when I use two expression in my singleton its not working... And if I use that in the main query it works...
nobody knows ? :/
Can you post the full expression?
I'll try to post an example next time I'm at a client that has the samples.
someone of a support team in my company resolved the problem.
He wrote one data item :
completeTuple([dimension1].[member1],[cost_monthly_actuals])
and the other :
TUPLE([dimension1].[member1],[dimension2].[member1],[cost_monthly_actuals])
and the result :
[dataitem1]-[dataitem2]
it works :)