Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know you've already posted similar cases and gotten answers. Based on them I have been able to solve some issues that I had but still present one.
I have to count some codes of the current year and in the corresponding month when the difference between two dates is 0.
This is the code that has issues:
COUNT(DISTINCT(IF($(DIFF_YEAR) = 0 AND [YEAR] = {'CYTD'} AND MONTH = $(=MONTH_NO), CODE)))
When I use the following instruction it works:
COUNT(DISTINCT(IF($(DIFF_YEAR) = 0, CODE)))
But when I add AND [YEAR] = {'CYTD'} and MONTH = $(=MONTH_NO). Does not show results.
Thank you for your help.
Hi guys,
Thank you for your help. I'd like to share with you that I got the info that I needed so far.
I used this sentence and it's working:
COUNT( DISTINCT( IF( $(DIFF_YEAR) = 0 AND YEAR = 'CYTD' AND MTH_NO = $(=MONTH_NO), INFORCE_POL_NO)))
I was checking the month values when you (Kush) asked me and I found that I was taking a bad field MONTH and I have to take MTH_NO.