Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

ValueList and aggr

Hello,

I really need your help with ValueList and aggr function.

I have table with power usage and want to give out the KW and the KwH per phase . We have 3 phases.

My ValueList: =ValueList('Phase 1','Phase 2','Phase 3', 'Summe')

Tabelle.jpg         


My actual expression for KW is:

if(ValueList('Phase 1','Phase 2','Phase 3','Summe')='Phase 1',

sum(aggr(avg(phase1_avg),PDU1)),
if(ValueList('Phase 1','Phase 2','Phase 3','Summe')='Phase 2',

sum(aggr(avg(phase1_avg),PDU1)),
if(ValueList('Phase 1','Phase 2','Phase 3','Summe')='Phase 3',

sum(aggr(avg(phase1_avg),PDU1)),
if(ValueList('Phase 1','Phase 2','Phase 3','Summe')='Summe',
sum(aggr(avg(phase1_avg),PDU1))          
+
sum(aggr(avg(phase1_avg),PDU1))
+
sum(aggr(avg(phase1_avg),PDU1))
))))

For KW in phase 2 and 3 I only get 0-Values. It just show the same values like in phase 1.

When I try with NODISTINCT I get no the right results.

Just for example I used for all ValueList-Options the phase1_avg.

In the real application I will get different values for phase 1, phase 2 and phase 3.

Do you have any idea?

Thanks,for any help in adavance.

Best regards
Sabine

1 Solution

Accepted Solutions

Re: ValueList and aggr

3 Replies

Re: ValueList and aggr

Not applicable

Re: ValueList and aggr

Hi Sunny,

many thanks for this link.

This helped me a lot.

Thanks and best regards

Sabine

Re: ValueList and aggr

I am glad we were able to help you learn something new. But you need to thank troyansky‌ here

Community Browser