Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've just looking at a PoC at the moment and was wondering if there's a way to produce a graph, based on customer sales for example but the labels for customers will show the customer selected and then for the rest of the customers state, "customer 1, customer 2, customer 3" and so on. Obviously when the customer selection is changed, that customer label is then visible and everything else is labelled as before, customer 1 etc
Thanks
Kev
OK, this is closer to your original request:
If you define the customers as a dual like this:
LOAD Dual(Customer, RowNo()) As Customer,
Value
;
LOAD * Inline
[
Customer, Value
....
(You can use Rowno() like this or Autonumber() to get a distinct number for each customer)
Then you could use this expression:
=If(Index(GetFieldSelections(Customer, '|'), Customer), Customer, Dual('Other', Num(Customer)))
And the non-selected customers will be one line per customer, all labelled 'Other'. The value of the dual is used for the dimension, and they all have different values in spite of the same label.
Could you explain a bit more may be with a sample data set?
Hey there,
Not sure you what you want, but try add these 4 expressions in you table:
For customer selected:
=Sum{Sales)
For customer 1:
=Sum{{$<Customer = ['customer 1'>} Sales)
For customer 2:
=Sum{{$<Customer = ['customer 2'>} Sales)
For customer 3:
=Sum{{$<Customer = ['customer 3'>} Sales)
Best regards,
D.A. MB
PS: if this doesn't solve your problem give us a better explanation and exemplify with sample of your data and the expected output.
I am not sure your intend, But as i understand you can use this
Aggr(Sum(Sales), Customers)
Maybe something like that:
=if(Customer =getfieldselections(Customer), Customer, 'Customer'&RowNo())
You could probably do this with a calculated dimension. I got this far:
=If(Index(GetFieldSelections(Customer, '|'), Customer), Customer, 'Other Customers')
So this will show the selected customers by name, and group the rest in 'Other Customers'. I have not been able to figure out a simple way in the front end to show the others with individualized names.
OK, this is closer to your original request:
If you define the customers as a dual like this:
LOAD Dual(Customer, RowNo()) As Customer,
Value
;
LOAD * Inline
[
Customer, Value
....
(You can use Rowno() like this or Autonumber() to get a distinct number for each customer)
Then you could use this expression:
=If(Index(GetFieldSelections(Customer, '|'), Customer), Customer, Dual('Other', Num(Customer)))
And the non-selected customers will be one line per customer, all labelled 'Other'. The value of the dual is used for the dimension, and they all have different values in spite of the same label.
Hi Kevin,
Add a listbox with field Customer and assign it to an alternate state such as PickCustomer, then try this calculated dimension:
=Aggr(if(Customer=only({PickCustomer}Customer),Customer, 'Customer ' & FieldIndex('Customer',Customer)), Customer)
Kind regards
Andrew
May be it can be even done like this without alternate state
=Aggr(if(Only({<Customer>}Customer) = Customer,Customer, 'Customer ' & FieldIndex('Customer',Customer)), Customer)
Picking up a tip from Sunny's suggestion - no need to load Customer as a dual, use this instead:
=If(Index(GetFieldSelections(Customer, '|'), Customer), Customer, Dual('Other', FieldIndex('Customer',Customer)))