9 Replies Latest reply: Sep 26, 2016 5:24 AM by Jean-Baptiste RENAULT RSS

    Anonymise customers

    Kevin Brown

      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

        • Re: Anonymise customers
          Tresesco B

          Could you explain a bit more may be with a sample data set?

          • Re: Anonymise customers
            Miguel Braga

            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.

            • Re: Anonymise customers
              Anil Babu Samineni

              I am not sure your intend, But as i understand you can use this

               

              Aggr(Sum(Sales), Customers)

              • Re: Anonymise customers
                Jean-Baptiste RENAULT

                Maybe something like that:

                =if(Customer =getfieldselections(Customer), Customer, 'Customer'&RowNo())

                • Re: Anonymise customers
                  Jonathan Dienst

                  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.

                    • Re: Anonymise customers
                      Jonathan Dienst

                      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.

                       

                      Capture.PNG

                    • Re: Anonymise customers
                      Andrew Walker

                      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