Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

show amount of a passed date

hello.

i have a donation date.

i made 2 more columns "last donation date", "next donation date"(i have added them in the script).

each donation have a quantity.

i need to show the quantity of thr "last donation date" and not the donation date.

for example:

donation_date      amount      last donation date       amount

--------------------      ----------       --------------------------       -----------

05-04-2016            20              20-03-2016                 55

all i need is to show the amount for a spesific column.

thanks

6 Replies
MVP
MVP

Re: show amount of a passed date

What you have provided above seems like the output you are hoping for, can you provide the raw data behind this output?

Not applicable

Re: show amount of a passed date

unfortunatly no.. the data is confidential.

the output i provided is what i am hoping for

what i have now is only the amount for the donation date, even though there is an amount for the last donation date as well but i can only see the date that i sent on

what i have now is:

donation_date      amount      last donation date       amount

--------------------      ----------       --------------------------       -----------

05-04-2016            20              20-03-2016     

donation_date      amount      last donation date       amount

--------------------      ----------       --------------------------       -----------

20-03-2016             55              20-08-2015

MVP
MVP

Re: show amount of a passed date

Can you try something like this:

Table:

LOAD * Inline [

donation_date, amount, last_donation_date

05-04-2016, 20, 20-03-2016

20-03-2016, 55, 20-08-2015

];

Left Join (Table)

LOAD donation_date as last_donation_date,

  amount as last_donation_amount

Resident Table;

Capture.PNG

Not applicable

Re: show amount of a passed date

its a little bit more difficult because donation_date, amount are in one table and last_donation_date is in another

MVP
MVP

Re: show amount of a passed date

And that was the reason I asked for a sample. I don't know how your data looks like (and I probably still don't know). I am not asking to share your confidential information, but some dummy data which closely match the actual data.

Preparing examples for Upload - Reduction and Data Scrambling

Not applicable

Re: show amount of a passed date

this is what i have:

Accounts:

LOAD

AccountId

from blabla;

left Keep(Accounts)

table1:

LOAD

Date_donation,AccountID AS AccountId,Real_donation_amount

from blabla;


left join(Accounts)

load AccountId,

  date(max(Date_donation)) as LastDonationDate

  Resident table1

  where Date(Date_donation) < Date(Now())

  Group By AccountId;

and i need the last donation amount


Community Browser