This content has been marked as final.
Show 1 reply

1. Re: Order Sequence
Michel Caissie Jun 7, 2018 9:27 AM (in response to Jaime Lego)Jaime,
Here is the solution to your first 2 screenshot.
I get the Order number with the following formula
if first() = 0 then 1
elseif ATTR([Date]) = LOOKUP( MIN( [Date] ),1 ) then PREVIOUS_VALUE(0)
elseif ATTR( [Product] ) = LOOKUP( MIN( [Product] ),1 ) and MIN( [Product count per invoice] ) = 1 then PREVIOUS_VALUE(0)
else PREVIOUS_VALUE(0) + 1
end
where [Product count per invoice] is
{FIXED [Date], [Invoice Number]: COUNT([Product])}
Michel

OrderSequence(mc).twbx 857.8 KB
