Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to add the charges fees to the amount value having the oldest period.
For example:
> The expected result :
Period | Country | %_Key_SupplierNum | %_Key_SupplierInv | Total Amount
202002 | IT | S950205 | 1JD087134 | 36263,01
202003 | IT | S950205 | 1JD087134 | 569,52
> My current result :(see the last column in the table below)
Note : I also tried to calculate that directly in the script using the function FirstSortedValue. But, the charges fees are added to all the rows in the table instead of only the row with the oldest period.
Please could you help me to resolve this problematic?
Thank you in advance for your help.
try this:
create a chart, dims: %KeySupplierum, Period
expression: =sum([Total Amount]) + IF(Period=aggr(NODISTINCT max(Period),%_Key_SupplierNum), Charges,0)
If the period is = to the latest period for the Supplier, then add charge