Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
JoseGarcia
Creator III
Creator III

count previous period entries

Hi, 
Trying to count previous period entries.
date field is called:  [EightD.Month_Cut_of_date_8D]

Using this formula but no returning expected values
Any ideas? 

=Count({<[EightD.Flag_D1mnthEQCutOfDate]={1}, [EightD.Kx_Classification]={'K1S','K2'},[EightD.Solving_Cluster]={'GB1 - UK & Ireland (UK&I)'},[EightD.Month_Cut_of_date_8D]=[EightD.Month_Cut_of_date_8D]-30>} distinct [%ID_8D])

Thanks as always


Labels (1)
1 Reply
Anil_Babu_Samineni

@JoseGarcia the below bold part won't work this way.

=Count({<[EightD.Flag_D1mnthEQCutOfDate]={1}, [EightD.Kx_Classification]={'K1S','K2'},[EightD.Solving_Cluster]={'GB1 - UK & Ireland (UK&I)'},[EightD.Month_Cut_of_date_8D]=[EightD.Month_Cut_of_date_8D]-30>} distinct [%ID_8D])

 

Perhaps this

=Count( distinct {<[EightD.Flag_D1mnthEQCutOfDate]={1}, [EightD.Kx_Classification]={'K1S','K2'},[EightD.Solving_Cluster]={'GB1 - UK & Ireland (UK&I)'}>} If([EightD.Month_Cut_of_date_8D]=[EightD.Month_Cut_of_date_8D]-30, [%ID_8D]))

Note, If you are using this in charts, Qlik not able to understand the logic on this condition "If([EightD.Month_Cut_of_date_8D]=[EightD.Month_Cut_of_date_8D]-30" and it needs to be added some level of aggregation.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful