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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NormanStanleyBadger

Set Analysis - Sum first record only

Hi,

I have got the following set analysis to calculate the days between an SKU's entry date and inspection date.

Sum(

{<

[Customer Field]={Customer},

[Received Date]={">=$(=date#('01/01/2022','DD/MM/YYYY'))<=$(=date#(Today()-1,'DD/MM/YYYY'))"}

>}

NetworkDays([Received Date, Inspection Date])

)

It works, ok, but my issue is that - an SKU can have multiple inspections (and so multiple records in the inspection table), I only want to perform the calculation on the first inspection record for each SKU. Unfortunately, I cannot do it by date, but I do have an [Inspection signature_id] field, so the earliest record will be the lowest number attached to each inspection record for an SKU.

Does anybody know how this can be achieved?

Many thanks

NSB

Labels (4)
2 Replies
vinieme12
Champion III
Champion III

you will need to create a new field in your data model to flag the record with the smallest signature_id

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
NormanStanleyBadger
Author

Hi Vinieme,

I am not able to do that, is there no other way? 

Many thanks

NSB