I try to understand what's changed. I have also to recall my solution for myself It was few days ago i prepared it. From that time i prepared many solutions on this forum So, i can't remember every one.
If you need my help. please provide some test data with current and expected result. It will be fastet way for me to understand what to change
Dear Manish, Darek, and Toni, I appreciate for your fast responses.
I have created another thread "Max(TOTAL <>) statement within If statement" based on aggragation, but this thread is valid too. I'd await for your feedback if any. In any case all the input are helpful answers.
I have created an AUTONUMBER(MONTH(DocDate)) as FKM#in the loading script:
This produced 818.
Darek has produced following statement, which produced the right result. Further I'd clarify the if(count() ) statement.
I appreciate for your input. I branched out the discussion, and could not designate the helpful answer. But all in all, I appreciated your input. The very issue were resolved in two ways: [a.] one way by subtraction and change of weight assignment: [b.] another is to use if (count () ) statement.