Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Complicated aggr function

I have a table with users money at the end of day.

I have to calculate sum of users money at the end of each month.

In this example I have to sum this lines for January (MonthsStart(date)):

user1, 10.01.2016, 150

user2, 20.01.2016, 200

user3, 30.01.2016, 300

For February:
user1, 10.02.2016, 150    
user2, 20.01.2016, 200

user3, 30.02.2016, 300

TestData:

LOAD * INLINE [user, date, value

    user1, 01.01.2016, 75

    user1, 10.01.2016, 150

    user1, 01.02.2016, 75

    user1, 10.02.2016, 150   

    user2, 02.01.2016, 100

    user2, 20.01.2016, 200

    user2, 02.02.2016, 100

    user2, 20.02.2016, 200   

    user3, 03.01.2016, 100

    user3, 30.01.2016, 300

    user3, 03.02.2016, 100

    user3, 30.02.2016, 300   

];

1 Reply
settu_periasamy
Not applicable

Re: Complicated aggr function

Hi,

May be create a Flag for that date using the Key (user & month(date)..

and use that flag in your set expression.. l

May be check the attachment..