Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YTD Sales of selected persons

Hi,

I am trying to build a table showing year-to-date total sales amount of each salesperson who are still with the company.  Does anyone know how to do it on Table object (not in data load editor)?   Thanks.

Data table:

MonthSalespersonSalesperson StatusMonthly Sales Records
JanAWith the company

Record 1 :   500

Record 2 :   1000

JanBWith the company

Record 1 :  600

Record 2 :  800

JanCWith the company

Record 1:   301

Record 2 :   450

FebALeft the companyNIL
FebBWith the company

Record 1 :  600

Record 2 :  700

FebCWith the company

Record 1 :  450

Record 2 :  650

Expected Table object (as of Feb) :

Salesperson           Year-to-date Sales

B                             2700

C                             1851

Total                       4551

11 Replies
Anonymous
Not applicable
Author

Create one more field latest status and use condition like Latest_status='Active' in the dimension. You can use Firstsortedvalue() to get the latest status.

Anonymous
Not applicable
Author

Adding a new "latest status" field to the data-model is not preferred, is there any other method?