Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Marcushenriquesk

Display min date value based on aggr with id field

Working on a dashboard, one of the visual tools I'm using is a table. It has a few fields displayed as dimensions. But, I want to add a measure which will display the min date (RECEIVED_DATE) per each value in the field 'LOC_ID'. 

Here is my attempt but only null values show:

 

=min(aggr(RECEIVED_DATE,[LOC_ID-Location ID]))

5 Replies
hic
Former Employee
Former Employee

The reason could be that there are more than one RECEIVED_DATE per [LOC_ID-Location ID]. If so, you need to specify which RECEIVED_DATE to choose. Try

Min(Aggr(Min(RECEIVED_DATE),[LOC_ID-Location ID]))

Marcushenriquesk
Author

still only displaying null values when i tried using that function.

 

hic
Former Employee
Former Employee

There could be a number of other causes: Incorrect date interpretation of RECEIVED_DATE; no connection between RECEIVED_DATE and [LOC_ID-Location ID]; no field called [LOC_ID-Location ID], etc.

But it is not possible to tell from what you have written above. You need to give us a little more information.

Marcushenriquesk
Author

okay sure, so LOC_ID is the primary key of a table called locations. The host of information on that table is a lot of demographics regarding the locations we have as clients. The received date is part of a table called requisitions. the primary key of that table being acc_ID. for each ACC_ID there is a received date and each acc_id has a loc_id that is the association of what location we got the requisition from. Recieved_date is formatted as MM/DD/yyyy and is derived and tagged with #$date. each Location has a acc_id that has a received date that is the 'first'/ minimum requisition we received from that location. the purpose of this measure is to show the date of the first received ACC_ID per each loc_id

 

Marcushenriquesk
Author

the issue was not solved