Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET ANALYSIS

Hi all I have data as attached below and need a table to display the sum sales where date is max

I used the below expression to   do the same

sum({$<DATE={"$(=max(DATE))"}>}Sales)

I get the O/P as below

Customer Name

MONTH

Sales

YEAR

sum({$<DATE={"12/05/2014"}>}Sales)

120

ABC

May

120

2014

120

Now if I want all the customer’s name and their sales data with respective of their respective  max(date)

As below

Customer Name

MONTH

YEAR

DATE

sum({$<DATE={"12/05/2014"}>}Sales)

ABC

May

2014

12/05/2014

120

TCS

May

2014

10/05/2014

100

IBM

May

2014

05/08/2014

80

Kindly help

Thanking You

Vinayagam

Labels (1)
4 Replies
kiranmanoharrode
Creator III
Creator III

Dear Vinayagam,

Please use AGGR function,

=Sum(AGGR(sum({$<DATE={"$(=max(DATE))"}>}Sales),[Customer Name],Month, Year, Date))



This will work.


Regards

Kiran Rode

+91 8976977897

Not applicable
Author

hey Kiran

i tried the same but  couldnt get the desired output

Thanking You

Vinayagam

anbu1984
Master III
Master III

Try aggr only with Date field


=Sum(AGGR(sum({$<DATE={"$(=max(DATE))"}>}Sales),[Customer Name],Date))

tresB
Champion III
Champion III

Set analysis doesn't get executed row-wise. Try like in attached sample.