Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want users to be able to select a single company and see it's total sales in relation to the average sales for all companies..
How do I select all the values for sales and not just those that are currently selected.
ABC CO: $3,484,223 45% of average of $8,334,233
Ideas?
thanks!
Maybe this?
avg(aggr(sum({<Company=>} Sales),Company))
thanks john.
I'm not familar with some syntax here.
If the field name is Company, is this literal with all the brackes... "{<Company=>}" ?
Thanks!
The expression assumed your field name is "Company". The bracket portion is set analysis, which would be good to look up in the reference manual or help text, as it's a very powerful feature (though also difficult to master and with hard to follow syntax). In short, set analysis lets you look at a set of data that is different than currently selected. This particular set analysis tells the expression to ignore any selections in the Company field, so should give you "all" companies. Some companies may be skipped if, say, you've selected a specific year, and you didn't do business with that company that year. The selected year would also be taken into account in that you'd only be looking at the average sales to companies that year. Other sets could match other definitions of "average sales for all companies", but the one I gave seemed the most likely to meet your needs.