Forum Discussion
Mamoun_issa
6 years agoFrequent Visitor
Latest Invoice Amount - Iternation
Hello, I Have a table of invoices to that was submitted to the health insurance company that looks similar to this: Invoice No. Mode (1- submission, 2- Resubmissition, 3- Correction) Amo...
Fowmy
Super User
6 years agoMamoun_issa
You can add a new column with the code below:
Latest Amount =
VAR M =
CALCULATE(
MAX(Table1[Mode]),
ALLEXCEPT(Table1,Table1[Invoice No.])
)
VAR I =
CALCULATE(
MAX(Table1[Invoice No.]),
Table1[Mode] = M,
ALLEXCEPT(Table1,Table1[Invoice No.])
)
RETURN
IF( Table1[Invoice No.]=I && Table1[Mode] = M , Table1[Amount] , BLANK() )
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂