Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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'
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?
May be like this:
Dimension
Channel
Expression
Sum(Qtd)
Or you can use a calculated dimension
If(DsFilial like 'CP*', 'CP', 'VEIC')
Expression
Sum(Qtd)
Sum ({$<DsFilial={'CP*'}>} Qtd)
It worked perfectly, another lesson learned, thank you guys