Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

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..