Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Friends,
I have a sales history table.
I would like to filter max Transaction date for each material,
There are many fields but I am focusing only on Material and Trasaction date.
Currently I am using following formula
Material
Max(TransactionDate) as MaxTransDate
All other fields are commented.
owever, there is error and i donot get the desired result.
May be you can tell me how to use the max function.
Did you use Group by with this expression.
Ex:-
Load
Material,
Max(TransactionDate) as MaxTransDate
From TableName Group BY Material;
Try this,
Load
Max(TransactionDate) as MaxTransDate
From TableName ;
Regards,
Pratik Bhor
Anand,
Thanks for your Tip, I was not using Group by.
Now it is giving me desired results.
Cheers.
Raaj
Dears,
I have a table showing Inventory per material, last 6 month sales , previous month sales. This is working fine.
Now user want to see last Transaction date. That's why i asked earlier how to get max date per material.
I am using following script.
NoConcatenate
DailyInventory:
Load *
Resident DailyInventory_tmp;
Concatenate(DailyInventory)
Load *
Resident SalesPV_6Months;
Concatenate(DailyInventory)
Load *
Resident SalesPV_1Month;
Concatenate(DailyInventory)
Load *
Resident MaxTransactionDate;
DROP Table DailyInventory_tmp;
DROP Table SalesPV_1Month;
DROP Table SalesPV_6Months;
DROP Table MaxTransactionDate;
See below result Max Transaction date is not coming in same line but in the second line.
Seems I am doing soemthing wrong.
Material | MaxDateProduct | (InventoryQuantity) | (P6M_SalesQty) | (PM_SalesQty) |
000000000000105035 | - | 178.965 | 257.872 | 51.710 |
000000000000105035 | 29.09.2017 | 0 | 0 | 0 |