Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Missing values when pivot table collapse all

Hi,

When i collapse my table i missing alot of values in the right kWh collum.

when i expand it everything is okey.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be wrap the whole expression with another Sum(Agg())

Sum(Aggr(

Sum(kWhVG) *  ((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato, Senternavn, Målepunktnavn, Målepunktid))) + ('1'-sum(k_faktor)))


, Dato, Senternavn, Målepunktnavn, Målepunktid))

Assuming Dato, Senternavn, Målepunktnavn and Målepunktid are your chart dimensions

View solution in original post

7 Replies
sunny_talwar
MVP
MVP

What number are you expecting to see? What is the expression you use today?

Anonymous
Not applicable
Author

expression 1; sum(kWhVG)

expression 2; Sum(kWhVG) *  ((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato, Senternavn, Målepunktnavn, Målepunktid))) + ('1'-sum(k_faktor)))

expression two is a "correction" for expression one.

sunny_talwar
MVP
MVP

What number are you expecting to see Marius? I mean should it be sum of all the rows, but it is not? Is that the issue you are running into?

Anonymous
Not applicable
Author

kWh to the right should be 680 355. (When i expand the table and sum all the rows, i get 680 355).

This expression gives a result 0,9817;

((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato, Senternavn, Målepunktnavn, Målepunktid))) + ('1'-sum(k_faktor)))

693038 * 0,9817 = 680 355

sunny_talwar
MVP
MVP

May be wrap the whole expression with another Sum(Agg())

Sum(Aggr(

Sum(kWhVG) *  ((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato, Senternavn, Målepunktnavn, Målepunktid))) + ('1'-sum(k_faktor)))


, Dato, Senternavn, Målepunktnavn, Målepunktid))

Assuming Dato, Senternavn, Målepunktnavn and Målepunktid are your chart dimensions

Anonymous
Not applicable
Author

Senternavn, Målepunktnavn and Målepunktid is my chart dimensions.


"Dato" is a part of this expression; sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato))


works perfect! thanks

Sum(aggr(Sum(kWhVG) *  ((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato, Senternavn, Målepunktid, Målepunktbeskr))) + ('1'-sum(k_faktor))) , Senternavn, Målepunktid, Målepunktbeskr ))


sunny_talwar
MVP
MVP

Awesome