Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
rafaeloneil
Not applicable

sum of expression with only one criterie

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?

4 Replies
sunny_talwar
Not applicable

Re: sum of expression with only one criterie

May be like this:

Dimension

Channel

Expression

Sum(Qtd)

sunny_talwar
Not applicable

Re: sum of expression with only one criterie

Or you can use a calculated dimension

If(DsFilial like 'CP*', 'CP', 'VEIC')

Expression

Sum(Qtd)

mov
Not applicable

Re: sum of expression with only one criterie

Sum ({$<DsFilial={'CP*'}>} Qtd)

rafaeloneil
Not applicable

Re: sum of expression with only one criterie

It worked perfectly, another lesson learned, thank you guys