Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have to write a set expression for the following condition.
I need to count the distributor Id if the sd_verify_max_date is less than the currently selected month and year.
If only(Year) > Year(sd_verify_max_date)) and if((only(Year) = Year(sd_verify_max_date) and only(Month) >= Month(sd_verify_max_date) then count of distributor Id.
Please reply.
Hi, Rahul
You would need to test but it would something like:
count({<sd_verify_max_data ={"<$(=Only(Year))"}>}distributor_id)
That should work ![]()
Hope it helps.
Best regards.
Count({$ <Year={'>=$(=Year(getfieldselection(sd_verify_max_date)))'}, Month={'>=$(=Month(getfieldselection(sd_verify_max_date)))'}>} distributor_Id)
Let me know
Assuming sd_verify_max_date is a date field (not strings) then something like this:
count({<sd_verify_max_date ={'<$(=makedate(max(Year),max(Month)))'}>} DistributorID)
Hi Alessandro,
The expression value is not changing for different selection of month and year.
Let me know the format for sd_verify_max_date, is it a date?
Yes the sd_verify_max_date is in Date format. And one more issue is that the combination of Year and Month both needs to be considered else it is taking month separately, i.e. 2014 march is considered >= only till 2013 march...months after that are not taken into consideration. So it should be like if selected year is greater than the year of sd_verify_date than only year should be considered and if selected year is equal to the year of sd_verify_date than both year and month should be considered.