Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
];
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..