5 Replies Latest reply: Jul 17, 2017 6:34 AM by bruno bertels RSS

    FieldValue('NumAcquisto',FieldIndex('Label',Label)

    Annamaria Ascione

      Hi Everyone,

      I need an Help:

      I need to create a measure to calculate N. Clienti and then %Clienti in another pivot table.

      I want to create a pivot table with Client target 100% -->

      All customers who made the first purchase in the period selected by the user in output box and among these customers those who have made at least 2 purchases, at least 3, ... Up to 10 (like in attached picture).


      NumeroAcq:

      Load * inline [NumAcquisto,Label

      1,1° Acquisto

      2,2° Acquisto

      3,3° Acquisto

      4,4° Acquisto

      ];

       

      I create an inline table Only for the label but it is not linked to the tables previously loaded in the script.

      Formulas:

      sum(

      if(

      sum({<[Client ID]=p({<[Periodo Primo Ordine]={'$(vMeasure)'}>}),[Order State 2]={'Confermato'}>}[Numero Ordini])

      >=FieldValue('NumAcquisto',FieldIndex('Label',Label))

      ,1,0))

       

      It doesn't works because FieldValue('NumAcquisto',FieldIndex('Label',Label) has too many values.

      Can Someone Help me??

      I attach the qliksense app and the picture of what I want to replicate with qliksense.