Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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)

15 Replies
migueldelval
Specialist
Specialist

Hi Marius,

What it´s the meaning of ELEMENTPRIS, Effektledd and ELEMENTPRIS, Energiledd?

Regards

Miguel del Valle

Anonymous
Not applicable
Author

Elementpris is the price table/field.

you can see it in the attached example.

sankartalluru
Contributor III
Contributor III

Hi,

Max command doesn't work in Variable.

Please write the expression in script where Date and ELEMENTPRIS columns are coming.


ELEMENTPRIS/366*day(monthend(Date)) as FInalELEMENTPRIS


and now we can use the above column in charts.

migueldelval
Specialist
Specialist

Hi Marius,

If you need to show information for a range based in natural months you can use month(Dato) in your script and use this field as dimension in your table.

If your range are specially you only need to make a condion in your script and use it as dimension in your table. Eg:

IF(

     month(Dato)='Jan' or month(Dato)='Feb',

     'Ene-Feb',

     If(

          month(Dato)='Mar' or month(Dato)='Apr',

          'Mar-Apr',

          If( ...

                                                            as Range_Month,

But I repeat, always it´s better use a Master Calendar to manage a Date.

Regards

Miguel del Valle

sunny_talwar

I don't see a reason to use Aggr() function here.... why not just this:

Day(MonthEnd(Max(Dato)))

migueldelval
Specialist
Specialist

Hi Marius,

Did you solve your Question?

Regards

Miguel del Valle