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

Count where Datefield = current year

Hi, 

I would like to count all customers who have been customers since this year. The date field "S_Custom.Custom_since" is available for this.
In addition, the condition "S_Custom.ypA_NK_BST = {1}" must be met.

I've been trying all the time to find the right formula to only display the customers for the current or selected year. Unfortunately without success.

Do you have a tip for me?

Count({<Year(S_Custom.Custom_since)={current year/selectet year}, S_Custom.ypA_NK_BST = {1}>}distinct [S_Custom.Custom])

1 Reply
RégisBer
Partner - Contributor II
Partner - Contributor II

Hello, 


I think you must create a field Year(S_Custom.Custom_since) ASS_Custom.Custom_since_year in the script 
then use this :


Count({<S_Custom.Custom_since_year={$(=Max(Year))}, S_Custom.ypA_NK_BST = {1}>}distinct [S_Custom.Custom])

 

Regards,

Régis