Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am moving up from 8.20 to v9 so set analysis is new to me.
I have a chart which is displayed only when a specific salesman is selected. It should show a count of his orders and as a relative of the total for his area, by month. The bar chart would be stacked where the area total expression would be the total minus the salesmans total.
The attached qvw shows what I see against what I want to see and I would appreciate any help.
Regards,
Gordon
Will any of your Salesman have multiple Areas? I couldn't find one in your sample app. If so, you'll need to modify the expression slightly.
I used:
count({1<Area={'$(=concat({<Salesman={'$(=GetFieldSelections(Salesman))'}>}
distinct Area))'}>} Ref)This is kind of messy, but basically is returns the selected Salesman, then it returns any applicable Areas for that Salesman. And then it only counts the Refs when that Area is relevant to that Salesman. Whew. ![]()
I've attached a sample app. If you allow more than one Salesman or no Salesman to be selected, you will also need to modify it.
For multiple areas to work, you probably need something like:
count({1<Area={'$(=concat({<Salesman={'$(=GetFieldSelections(Salesman))'}>}
distinct Area, Chr(34) & ',' & Chr(34)))'}>} Ref)As you say - phew!
I'm going to take a little time to disect the code to understand it better - thanks very much indeed for the help.
Regards,
Gordon