Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

sum up the sales amount

Hi guys,

I have a table with columns visit_date, sales_date, sales_amount. If I want to sum up the sales amount with sales date larger than visit date, can I use the formula:

SUM({<sales_date={>visit_date}>}sales_amount) ?

Thanks for help!

5 Replies
YoussefBelloum
Esteemed Contributor

Re: sum up the sales amount

Hi,

try this:

SUM({<sales_date={">$(=max(visit_date))"}>}sales_amount)

wanyunyang
Contributor

Re: sum up the sales amount

I mean if there's a record with visit on Jan.1, sales on Jan.2, sum the amount. If another record with visit on Jan.4, sales on Jan.3, don't sum that amount.

YoussefBelloum
Esteemed Contributor

Re: sum up the sales amount

Yes this expression will do the calculation like what you just described.

did you test it ?

vanand3535
Contributor

Re: sum up the sales amount

try this and tell

SUM({<sales_date={">visit_date"}>}sales_amount)

zebhashmi
Valued Contributor

Re: sum up the sales amount

SUM({<sales_date={">=visit_date"}>}sales_amount)

Community Browser