
Indirect set analysis
Mihai Petcu Oct 18, 2009 5:21 AM (in response to Konstantins Skaredovs )your syntax isn't right. you;ve missed a ")"and the "TOTAL".
this should work:
if(len(Dev1)>0,
sum({$<ReportLine = P ({1<Line={"$(=maxstring(Dev1))"}>} ReportLine ) >} TOTAL Amount) /
sum({$<ReportLine = P ({1<Line={"$(=maxstring(Dev2))"}>} ReportLine ) >} TOTAL Amount),
sum(Amount)
)works also without the "ReportLine" before de TOTAL.
"If the field in the element function is omitted,
the function will return the possible values of the field
specified in the outer assignment."
Indirect set analysis
Konstantins Skaredovs Oct 19, 2009 1:19 PM (in response to Mihai Petcu)Hi Mongolu,
Thanks for advise. But unfortunately this script is working only in one subtotal case.
I have attached example with many subtotals. I need to see it in pivot or straight table, as shown in example. The main question is how to return the value of the current dimension to indirect set analysis string (in place of {"$(=maxstring(Dev1))"})?Something like this script, which is not working:
if(len(Dev1)>0,
sum({$<ReportLine = P({1<Line={Dev1}>} )>} total Amount)/
sum({$<ReportLine = P({1<Line={Dev2}>} )>} total Amount),
sum(Amount))
Any other solution?
Best regards,
Konstantins
Indirect Set Analysis.qvw 202.6 K

Indirect set analysis
Mihai Petcu Oct 26, 2009 11:57 AM (in response to Konstantins Skaredovs )Well, I must say i don't know.
I've tried some options, but it won't work.
Using the value of the dimension Dev1(or 2) into the Set ... seems the syntax is wrong or maybe it can't be done this way.
But I'll say to you this (what a friend of mine gave me in this moments): think out of the box!
Maybe the abbordation is not quite the good one. Maybe you should think at another approach to reach the data.
Sorry,
Mihai

Indirect set analysis
Stephane DUGUET Jun 23, 2010 12:10 PM (in response to Konstantins Skaredovs )Dear Konstantins,
Have you found the solution to the question :
how to return the value of the current dimension to indirect set analysis string ?
I've got the same issue.
In a crosstab like :
Dim Indic
A =formula
B =formula
C =formula
how in the "formula" could I get in a set analysis the value of "Dim" of the current line ?
I've tried
$(=Dim)
$(=concat(Dim,','))
$(=only(Dim))
and fieldvalue, P(), …
The main issue is that a set analysis is "out of the crosstab", and know only of the selections.
A formula like =concat(Dim,',') get the dim value (A or B, or C), but the same in a set analysis get the whole list : A,B,C for the concat part.
=SUM({$<Dim2={$(=concat(Dim1,','))}>} X)
will return SUM({$<Dim2={A,B,C}>} X)
but I would like to get SUM({$<Dim2={A}>} X) when on the A line and SUM({$<Dim2={B}>} X) when on th B line.Any idea ?

