Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Micki
Creator
Creator

Count First Occurrences of Value

Hi folks, below my simple table 

 

Table1.DateTable2.FieldNew Defectsfirstsortedvalue(Date,Date])
20200120New12020-01-20  
20200127New12020-01-27  
20200203New12020-02-03  
20200210New12020-02-10  
20200217New12020-02-17  
20200224New12020-02-24  

Please Notice that i have two fields from different table and i need just to count first appearances

 

What i did:

 

 

 

COUNT({
[FLAG_NEW] = {'New'},
[Date] = {"=firstsortedvalue(floor([Date]), floor([Date]))"}
					>}DISTINCT [%WorkItem])


//Option 2
count(Aggr(
  If(FirstSortedValue(Date_FLoor, -Date_FLoor) = Floor_CreatedDate, 1, 0)
, [%WorkItem]))

 

 

 

Still doesn't work 😞

 

Second Option is working but when i select specific bar it's stop working because i used aggr() 

 

Expected result 

Table1.DateTable2.FieldNew Defectsfirstsortedvalue(Date,Date])
20200120New12020-01-20  
20200127New 2020-01-27  
20200203New 2020-02-03  
20200210New 2020-02-10  
20200217New 2020-02-17  
20200224New 2020-02-24  
1 Reply
Kushal_Chawda

@Micki  what is the dimension of Bar? Try adding that Dimension as well in aggr