Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Calogero_Alfeo
Contributor
Contributor

Replace an value between 2 dates (Conditions)

Hi dear QlikSense teammates,

Hope you are doing well.

I would like to create a condition to replace a value by another one between two dates. 

I have a specific example heureunder:

I would like to replace the value 'Jour férié' in the third lines by 'Maladie'.

2 Conditions :

1) 'Jour férié' is surrounded by the value 'Maladie'.

2) The dates must follow each other (31/12/2021 -> 01/01/2022 -> 02/01/2022)

Calogero_Alfeo_0-1666252377955.png

Thank you,

Regards.

Calo

Labels (1)
1 Reply
Mario_De_Felipe
Luminary
Luminary

Assuming your table is order by date ascending (you can force it using Table order properties), I think what you want is something like this:

if(above([Field])='Maladie' and [Field]='Jour férié' and before([Field])='Maladie' and above([DateField]=Date([DateField]-1) and before([DateField])=Date([DateField]+1),'Maladie',[Field])

Hope it helps