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

Creating a new field in a table based on if condition but doesn't appear

Hello everyone, I added a field as it's shown in the code bellow

 

Noconcatenate
Tab2:
Load 
date,Service, Volume_Réel_GO, Volume_Réel_GO_2G,Volume_Réel_GO_3G,Volume_Réel_GO_4G,
if(Volume_Réel_GO<=10                                  ,1,                                          
     if(Volume_Réel_GO>10  and Volume_Réel_GO<=50  ,2,
     if(Volume_Réel_GO>50 and Volume_Réel_GO<=100,3,4) AS ID_Palier_reel_Data
Resident tab;

 

But I get this result 

Nourrahmcnean_0-1651233068801.png

 

Labels (1)
1 Reply
rubenmarin

Hi, that extra commas might be messing with the syntax, try to set field names between []:

if([Volume_Réel_GO,]<=10 ,1,                                          
     if([Volume_Réel_GO,]>10  and [Volume_Réel_GO,]<=50  ,2,
     if([Volume_Réel_GO,]>50 and [Volume_Réel_GO,]<=100,3,4)