4 Replies Latest reply: Nov 11, 2016 7:29 AM by Marius Larsen

# Missing cells, calculates only one value in table.

Hi,

Why does my expression to the right only works on one dimension at the time?

Expression (Right): Sum(kWhVG) *  ((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato))) + ('1'-sum(k_faktor)))

Expression (Left): Sum(kWhVG)

if i click at a random målepunktnavn the expression works fine, but not the whole table. Same problem with barchart.

• ###### Re: Missing cells, calculates only one value in table.

Seems like a grain mis-match issue. Not sure what you goal is, but try adding all your chart dimensions to the aggr function

Sum(kWhVG) *  ((sum(k_faktor) * sum(GDTNORM) / sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato, Dim2, Dim3))) + ('1'-sum(k_faktor)))

• ###### Re: Missing cells, calculates only one value in table.

Works! Thanks

• ###### Re: Missing cells, calculates only one value in table.

One problem;

When i put in more dimensions to the expression the calculation gets wrong.

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

result:

(This is correct)

sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato))) <- we cant changes this.

when i put in more dimensions like Senternavn;

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

the result is:

• ###### Re: Missing cells, calculates only one value in table.

i made sum(aggr(if(avg(kWhTemp) >=17, 0, 17-avg(kWhTemp)), Dato))) in to a variable and then it worked !