Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
brunobertels
Master
Master

Find duplicate value and replace it in script

Hello everyone

I have a value replacement problem

In a table I have an "Indicators" field in which I have a Value 'Pause' repeat twice.

For each Name ,I once have the value 'Pause' (in bold in my table) which is always under the value 'Post-travail'.

 

This value 'Pause' in Bold corresponds to the sum of  values which are below.

 

I am looking to replace this 'Pause' value with the text 'HorsProd'

 

NameIndicateursNombreTemps
Nom1Attente50h29'19
Nom1Traitement50h53'03
Nom1Appel entrant50h53'03
Nom1Post-travail50h12'23
Nom1Pause10h01'03
Nom1Pause10h01'03
    
Nom2Attente181h23'36
Nom2Traitement202h09'32
Nom2Appel entrant161h51'47
Nom2Rappel20h17'24
Nom2Numérotation20h00'21
Nom2Post-travail180h42'05
Nom2Pause30h29'21
Nom2Pause10h00'13
Nom2Personnelle20h29'08

 

At first with the help of the community I managed to get there thanks to the Number fields by adding a flag max (number) and a group by where clause

 

It works if the Number of 'Pause' value is > to  the Number of 'Pause' (see Name2 example)

 

But see Name1 example :

 

If the value of the Number Pause field is equal to the value of the Number 'Pause' field, it does not work anymore

Also my question is how to change the field INDICATORS to replace the text 'Pause' which is always below the value 'Post-travail' by the value 'HorsProd'?

Thank you in advance for your help

 

Bruno

Labels (2)
0 Replies