Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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)

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Creator II
Creator II

Re: help with aggregation

solved it;

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

View solution in original post

15 Replies
Highlighted
Specialist
Specialist

Re: help with aggregation

Hi Marius,

Try this expression:

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

Regards

Miguel del Valle

Highlighted
Creator II
Creator II

Re: help with aggregation

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

Highlighted
Specialist
Specialist

Re: help with aggregation

Hi Marius,

What kind of master calendar are you using?

Regards

Miguel del Valle

Highlighted
Creator II
Creator II

Re: help with aggregation

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

i thing the problem is my variable or something..

Highlighted
Specialist
Specialist

Re: help with aggregation

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

Highlighted
Creator II
Creator II

Re: help with aggregation

se attached.

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

Highlighted
Creator II
Creator II

Re: help with aggregation

solved it;

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

View solution in original post

Highlighted
Specialist
Specialist

Re: help with aggregation

Perfect Marius,

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

Calendars

Regards

Miguel del Valle

Highlighted
Creator II
Creator II

Re: help with aggregation

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 ?