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

    Using a Field Like filter in set analysis

    Thiago Mendonca

      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