3 Replies Latest reply: Sep 6, 2014 4:25 PM by Thiago Mendonca

# Using a Field Like filter in set analysis

Guys,

is it possible to use a field like a filter in set analysis?

Example:

* 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

• ###### Re: Using a Field Like filter in set analysis

Can change the input file? or is necessary in this format?

• ###### Re: Using a Field Like filter in set analysis

Hi,

maybe one solution:

```tabInput:
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:
Value
Resident tabInput
Where Type='Value';

Left Join (tabData)
SubField(Group, ',') as Field
Resident tabInput
Where Type='Total';

DROP Table tabInput;
```

hope this helps

regards

Marco

• ###### Re: Using a Field Like filter in set analysis

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