Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have hit a brick wall with the Aggr function. I basically want to show the latest record for a summary of spend, but ensure that the total spend is a sum of all prior records. The reason being that suppliers information changes over time and I just need the latest record of detail. I have created an indicator to give me the max date and the expression for the straight table is as follows:
Aggr(sum({<Latest_record_indicator>}),[Amount])
Now the indicator, when selected works in some cases, but in other cases, I am losing records. When I make other selections, Category for example, it throws my balances completely off. I tried applying this logic but it still doesnt balance:
Aggr(sum({<Latest_record_indicator,Category>}),[Amount])
Anyone have any suggestions or similar experiences?
I don't think that this
Aggr(sum({<Latest_record_indicator>}),[Amount])
is valid syntax, it seems you're missing the expression to aggregate in your sum() function.
Then, just using set expression
{<Latest_record_indicator>}
is just clearing any selections in Latest_record_indicator field, it is not filtering your data for latest records (or have I misunderstood what you are trying to show here?).
Finally, I think you need an aggregation function around the aggr() function, to aggregate the table returned from the aggr() function (there are special cases where you don't explicitely need one, but in most cases, you do).
Could you post a small sample app here?
Regards,
Stefan
Yes it will be right to have a sample copy.