Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends,
Can you please let me know how can we use aggr fun with in Set Analysis?Any manual or examples will be really helpful.
Thanks
KC
If your Currency in dimension, try like:
=FirstSortedValue(Aggr(Sum(rates),Date), -Date) // If multiple rates are there for a date
=FirstSortedValue(rates, -Date) // when sigle rate for a date
Edit: The first exp, probably should be like: =FirstSortedValue(Aggr(Sum(rates),Currency,Date), -Date)
Kc,
This may help you.
Thanks,
AS
PFA documents on AGGR,
Vikas
Set analysis evaluates once for an object while aggr() is more frequently used in chart to manupulate the normal dimension filter effect. Hence, use of aggr() in set analysis is not that usual. And, probably there is no such document. If you could explain your requirement with sample data, may be people here could help of better.
Hi Tresesco,
Iam just try to do this:
sum({<Date={"=Aggr(max(Date),Currency)"}>}rates)
I have Currency and Dates & rates corresponding to that.So i was trying to get the Rates when Date is max corresponding that Currency. Same Currency have different Rate corresponding to different dates.
Regards
KC
If your Currency in dimension, try like:
=FirstSortedValue(Aggr(Sum(rates),Date), -Date) // If multiple rates are there for a date
=FirstSortedValue(rates, -Date) // when sigle rate for a date
Edit: The first exp, probably should be like: =FirstSortedValue(Aggr(Sum(rates),Currency,Date), -Date)
Thanks Tresesco,
So we cant use Aggr function with in Set analysis ? And expression above is wrong ?
We can, but it would not produce the desired result. Aggr() withing set analysis doesn't get evaluated multiple times (you might expect as many times as number of field values), it would just work for the first value(load order) of the field.
Got it .Thanks a lot tresesco.
Regards
KC