Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
marius_larsen
Creator II
Creator II

help with aggregation

Hi,

My table chart shows wrong values ( Month, Feb)  149 when it is expanded.

when i choose only Feb the expression is correct.  139

variable:

=Day(MonthEnd(Max(Dato)))

Expression:

sum({<PRISTABID={'745'}>} distinct ELEMENTPRIS/366*vDaysMonth)

1 Solution

Accepted Solutions
marius_larsen
Creator II
Creator II
Author

solved it;

aggr(Day(MonthEnd(Max(Dato))),Måned,Kontraktsgruppenavn, Målepunktid))

View solution in original post

15 Replies
migueldelval
Specialist
Specialist

Hi Marius,

Try this expression:

=(sum({<PRISTABID={'745'}>} ELEMENTPRIS)/366)*vDaysMonth

Regards

Miguel del Valle

marius_larsen
Creator II
Creator II
Author

Not correct..

now i got this output:

the one to the left is correct, but the feb month shows 149 when it should show 139.

when i select only february it shows 139

migueldelval
Specialist
Specialist

Hi Marius,

What kind of master calendar are you using?

Regards

Miguel del Valle

marius_larsen
Creator II
Creator II
Author

Not sure, i have used the same for several years.. script file.

i thing the problem is my variable or something..

migueldelval
Specialist
Specialist

Hi Marius,

I think that it´s good always use a master calendar to handdle days/month/year.

You can make a new field in your script with days of each month.

If you attach an example I would help you.

Regards

Miguel del Valle

marius_larsen
Creator II
Creator II
Author

se attached.

my variable dosent aggregate between months so it uses only 31 for all months when the table shows jan-des.

marius_larsen
Creator II
Creator II
Author

solved it;

aggr(Day(MonthEnd(Max(Dato))),Måned,Kontraktsgruppenavn, Målepunktid))

migueldelval
Specialist
Specialist

Perfect Marius,

But red this article, I think that could be interesting for you.

Calendars

Regards

Miguel del Valle

marius_larsen
Creator II
Creator II
Author

Thanks

One question;

i have "ELEMENTPRIS, Effektledd" for each month

01.01-01.02

01.02-01.03

01.03-01.04 and so on.

but i only have "ELEMENTPRIS, Energiledd" with a range of several months.

01.01-01.04

01.04-01.09

how can i create Elementpris, Energiledd for each month ?