Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using Set Analysis to calculate Indicators

Dear colleagues,

I have a table in which I have to do extract three KPIs:

  1. Number of production orders
  2. Quantity of products received
  3. Number of Products demanded

IDDate_ReceivedType IDNumber_Products_ReceivedNumber_Products_Demanded
101/01/201713075
115/01/201714575
216/01/201712040
224/01/201712040
315/02/201721010

  • For indicator #1, I need to calculate the number of different IDs, which type is not 2;
  • For indicator #2, I need to calculate the number of products received per ID (it is important to say that there can be other field that can duplicate the values above)
  • For indicator #3, I need to calculate the number of products demanded per ID, which type is not 2 (please check that the field of number of products demanded replicates according to the received date - and there can be other fields which can duplicate the value as well)

Can anyone help me with this?

Thank you in advance!

1 Reply
sunny_talwar

May be these

1) Count(DISTINCT {<[Type ID] -= {2}>} ID)

2) Sum(Aggr(Sum(DISTINCT Number_Products_Received), ID, Date_Received))

3) Sum({<[Type ID] -= {2}>} Aggr(Sum({<[Type ID] -= {2}>} DISTINCT Number_Products_Demanded), ID))