4 Replies Latest reply: Sep 27, 2016 1:17 PM by Rafael Souza RSS

    sum of expression with only one criterie

    Rafael Souza

      Hello people,

       

      First I thank all members of this community forum so far helped me a lot at the beginning of learning and use of QlikView, you are very collaborative!

       

      I'm racking my brain to make a conditional sum function,

      I have data table below:

      chart2.png

       

      Classify the values of [DsFilial] in the following form:

      1) CP: where [DsFilial] like 'CP*'

      2) VEIC: where [DsFilial] not Like 'CP*'

       

      I tried using the following expression without success:

      Sum ({$ <[DsFilial] like { 'CP*'}>} Qtd)

       

      I also tried to create a field for such a definition [Channel] that performs this distinction

      "if (DsFilial like 'CP*', 'CP', 'VEIC') as 'Channel' 

      chart2.png

      in data load and pointed expression to the created field, but also not I succeeded:

      Sum ({$ <[Channel] = {'CP'}>} Qtd)

       

      Can show me the correct way to expression work?