Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using an aggr function to sum up my sales. Is it possible to combine it with set analysis so that it doesn't matter
what's selected?
Thanks
Would this work for you? sum({1}field) This would disregard all selections providing they are not a dimension in your chart.
Regards
Yes, you can have a set in pretty much any expression, so it will work in Aggr:
max(aggr(Sum({ < SetField = {"value"} > } SalesValue, Country)))
Stephen
Thanks Stephen,
unfortunatley I'm still having problems. I'm trying to see the max sales of (all) customers in Max Sales, in this case the value should
be 50.000, no matter what's selected.
I tried Max Sum Sales: max(aggr(Sum({ < Customer_ID = > } Sales, Customer_ID)))
should look like:
Customer ID Sum Sales Max Sum Sales Max Sales
1 10.000 50.000 60.000
2 35.000 50.000 60.000
3 10.000 50.000 60.000
4 40.000 50.000 60.000
5 60.000 50.000 60.000
Thanks
I think you mean the max sales of all customers should be 60.000. Why do you want to use "Set Analysis"?
Try max(total aggr(Sum(Sales), Customer_ID)) ...
There should be no changing in the max value (60.000) when selection a customer_id.
I thouhgt I could handle thos with Set Analysis.
Ah ok, now i understand.The "max-value" should be independent to every filter.
In this case i would fix the values in the script when reloading the data.
Hi,
You need to put the set in both the Sum and the Aggr:
max
({<Customer_ID=>} total aggr(Sum({<Customer_ID=>} Sales), Customer_ID))Stephen
Hi Stephen,
in this case I only get values as long as I don't select a certain customer_id. In case of selecting a customer calculation is "-"
It seems to me the Stephen's solution is good, also when I select a customer.
Try the equivalent
max
({1} total aggr(Sum({<Customer_ID={*}>} Sales), Customer_ID)) .
Roberta