Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

Select only the latest value of item

Hello everyone,

I have been currently working on a sales table with some key algorithms

  

Data Source
DateBrandStatusSalesman
1/1/2018A0S
1/2/2018A0S
1/3/2018B1S
1/4/2018B0S
1/5/2018B1S
1/1/2018A1j
1/2/2018A0j
1/3/2018B0j
1/4/2018B0j
1/5/2018B0j

In the data set above.the sales manager has a desire to see  only the status '1' for each salesman and brand in the selected period. If the sales manager selects a period from 1/1/2018 to 1/5/2018,

Table becomes


Start Date1/1/2018End Date1/5/2018

   

Brand
SalesmanAB
S01
J10

and when he selects 1/1/2018 to 1/1/2018

The table becomes

   

Start Date1/1/2018End Date1/1/2018
Brand
SalesmanAB
S00
J10

Can you kindly share your thoughts?

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

This should be the out of the box behaviour of a pivot table in Qlik. This can be by the user selecting Status = 1, or using it in a set expression like Status = {1}. Use Salesman, Brand as dimensions and Count({<Status = {1}>} Brand) as the expression.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
boraste-sagar
Contributor III
Contributor III

in the expression just pass this expression

if( Status= 1, Status)

if u dont want status to be printed then

if( Status= 1, 'Pas') that means in front of a and b when status =1 then Pass will be printed

boraste-sagar
Contributor III
Contributor III

xyz solution.png