on 09-16-2014 2:19 AM
Hi,
We have Eqp_Id, Doc_No, Valid_From_Date, Report_Date Rec_Id
66 199 6/18/2014 9/30/2014 R1
66 200 6/18/2014 9/30/2014 R2
66 338 7/28/2014 9/30/2014 R2
66 375 8/20/2014 9/30/2014 R2
66 376 8/20/2014 9/30/2014 R3
I want output Rec_Id for Maximum Doc_No
I am using two formulaes:
Max_Doc_No: =Max([Doc_N]) Where ([Valid_From_Date] Between([Jan First];[Report_Date]) )
Rec=[Rec_Id] Where ([Doc_No]=[Max_Doc_No])
When I output Eqp_id, Max_Doc_No, I am getting
66 376
When I output, Eqp_Id, Rec Max_Doc_No
66 R1 199
66 R2 375
66 R3 376
I want output Eqp_Id Rec_Id
66 R3
If I am using formula: [Rec_Id] Where ([Doc_No]=Max([Doc_N]) Where ([Valid_From_Date] Between([Jan First];[Report_Date]) )), I am getting multi value error
What is [Jan First]?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it's just a variable holding 1st Jan of current year then create a variable MaxRecInEqp as:
=Max([Rec_Id]) Where ([Doc_No]=Max([Doc_No]) In ([Eqp_Id]) And [Valid_From_Date] Between([Jan First];Max([Report_Date]) In ([Eqp_Id])))
Now create a table with Eqp_Id and MaxRecInEqp as the two columns.
Regards,
Mark
Hi Mark,
Thanks for your reply.
Will your formula satisfy the condition, I want the max doc satisfying the condition Valid_From _Date Between([Jan First];[Report_Date]) and get the rec_id for the max doc
I got this doubt because you are getting max(doc) in (Eqp_Id) without satisfying the condition Valid_From _Date Between([Jan First];[Report_Date]) first. and also getting max(Rec_Id).
Can you explain your formula in brief?
Hi Jyothy,
Your expected out like that if yes then apply max function for both objects
Rec_id Doc_No
R3 376
Regards
Mustafa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.