Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys,
is it possible to use a field like a filter in set analysis?
Example:
LOAD
* INLINE [ Field, Type, Value, Group
'AA', 'Value',5, ''
'BB', 'Value',6, ''
'CC', 'Value',7, ''
'T1', 'Total',0, 'AA,BB,CC'
'DD', 'Value',8, ''
'EE', 'Value',9, ''
'FF', 'Value',10, ''
'T2', 'Total',0, 'DD,EE,FF'];
I need that Field with Type equals "Total" behaves summarizing the values based in the Group Value Field.
My steps:
Variable: vSUM =Chr(39)&Replace(Group,',',Chr(39)&','&Chr(39))&Chr(39)
Expression in the chart
= if(Type = 'Total', Sum( TOTAL{$<Field = {$(vSUM)}> } Value), Sum(Value))
Follows the Qvw file
Can change the input file? or is necessary in this format?
Hi,
maybe one solution:
tabInput:
LOAD * INLINE [
Field, Type, Value, Group
AA, Value, 5,
BB, Value, 6,
CC, Value, 7,
T1, Total, 0, "AA,BB,CC"
DD, Value, 8,
EE, Value, 9,
FF, Value, 10,
T2, Total, 0, "DD,EE,FF"
];
tabData:
LOAD Field,
Value
Resident tabInput
Where Type='Value';
Left Join (tabData)
LOAD Field as Group,
SubField(Group, ',') as Field
Resident tabInput
Where Type='Total';
DROP Table tabInput;
hope this helps
regards
Marco
Marco,
I need the total be shown in a separate line, because it is pre configured.
Your solution is fine but for it to work i would need to transform my cloud.
i would like to use set analysis without transform the cloud
thanks